]> err.no Git - linux-2.6/blobdiff - drivers/ide/legacy/q40ide.c
Merge commit 'upstream/master'
[linux-2.6] / drivers / ide / legacy / q40ide.c
index 2dc306f852a663340ac68a39620468dec84d7919..4abd8fc781979df7dea762bd6ece387a7f436509 100644 (file)
@@ -132,9 +132,7 @@ static const char *q40_ide_names[Q40IDE_NUM_HWIFS]={
 static int __init q40ide_init(void)
 {
     int i;
-    ide_hwif_t *hwif;
     hw_regs_t hw[Q40IDE_NUM_HWIFS], *hws[] = { NULL, NULL, NULL, NULL };
-    u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };
 
     if (!MACH_IS_Q40)
       return -ENODEV;
@@ -158,18 +156,10 @@ static int __init q40ide_init(void)
        q40_ide_setup_ports(&hw[i], pcide_bases[i], NULL,
                        q40ide_default_irq(pcide_bases[i]));
 
-       hwif = ide_find_port();
-       if (hwif) {
-               hwif->chipset = ide_generic;
-
-               hws[i] = &hw[i];
-               idx[i] = hwif->index;
-       }
+       hws[i] = &hw[i];
     }
 
-    ide_device_add(idx, &q40ide_port_info, hws);
-
-    return 0;
+    return ide_host_add(&q40ide_port_info, hws, NULL);
 }
 
 module_init(q40ide_init);