summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-09 10:21:32 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2008-04-09 10:21:32 +1000
commit3112f5b420b91d0eb4404b2a0c0fdfc6c1dc1281 (patch)
tree0e93e54e44e565e8f23d82b889eea054ec793e3f
parent5f2a82f981e9892b94d0de56af52b35a3399d174 (diff)
ide: cleanup init_ide_data()
* Remove no longer need init_ide_data() call from ide_setup(). * Cleanup init_ide_data(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
-rw-r--r--drivers/ide/ide.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index 59cf7f8c9681..556a02c39184 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -157,32 +157,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) {
@@ -733,7 +710,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")) {