Merge branch 'release-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/ak...
[pandora-kernel.git] / drivers / ide / legacy / macide.c
index 2e84290..a0bb167 100644 (file)
@@ -91,11 +91,10 @@ static const char *mac_ide_name[] =
 
 static int __init macide_init(void)
 {
-       ide_hwif_t *hwif;
        ide_ack_intr_t *ack_intr;
        unsigned long base;
        int irq;
-       hw_regs_t hw;
+       hw_regs_t hw, *hws[] = { &hw, NULL, NULL, NULL };
 
        if (!MACH_IS_MAC)
                return -ENODEV;
@@ -125,18 +124,7 @@ static int __init macide_init(void)
 
        macide_setup_ports(&hw, base, irq, ack_intr);
 
-       hwif = ide_find_port();
-       if (hwif) {
-               u8 index = hwif->index;
-               u8 idx[4] = { index, 0xff, 0xff, 0xff };
-
-               ide_init_port_data(hwif, index);
-               ide_init_port_hw(hwif, &hw);
-
-               ide_device_add(idx, NULL);
-       }
-
-       return 0;
+       return ide_host_add(NULL, hws, NULL);
 }
 
 module_init(macide_init);