Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 101212
b: refs/heads/master
c: dbac9f8
h: refs/heads/master
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Jul 15, 2008
1 parent 5c23c95 commit a6b605d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 25 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 232595eaff951e96cabe5e85fed35f66b72ff51e
refs/heads/master: dbac9f895f628deebc99dee86dfd21c1823013c3
24 changes: 0 additions & 24 deletions trunk/drivers/ide/ide.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,32 +151,9 @@ static void ide_port_init_devices_data(ide_hwif_t *hwif)
}
}

/*
* init_ide_data() sets reasonable default values into all fields
* of all instances of the hwifs and drives, but only on the first call.
* Subsequent calls have no effect (they don't wipe out anything).
*
* This routine is normally called at driver initialization time,
* but may also be called MUCH earlier during kernel "command-line"
* parameter processing. As such, we cannot depend on any other parts
* of the kernel (such as memory allocation) to be functioning yet.
*
* This is too bad, as otherwise we could dynamically allocate the
* ide_drive_t structs as needed, rather than always consuming memory
* for the max possible number (MAX_HWIFS * MAX_DRIVES) of them.
*
* FIXME: We should stuff the setup data into __init and copy the
* relevant hwifs/allocate them properly during boot.
*/
#define MAGIC_COOKIE 0x12345678
static void __init init_ide_data (void)
{
unsigned int index;
static unsigned long magic_cookie = MAGIC_COOKIE;

if (magic_cookie != MAGIC_COOKIE)
return; /* already initialized */
magic_cookie = 0;

/* Initialise all interface structures */
for (index = 0; index < MAX_HWIFS; ++index) {
Expand Down Expand Up @@ -730,7 +707,6 @@ EXPORT_SYMBOL(generic_ide_ioctl);
static int __init ide_setup(char *s)
{
printk(KERN_INFO "ide_setup: %s", s);
init_ide_data ();

#ifdef CONFIG_BLK_DEV_IDEDOUBLER
if (!strcmp(s, "ide=doubler")) {
Expand Down

0 comments on commit a6b605d

Please sign in to comment.