]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/ide/legacy/ide-4drives.c
ide: remove [ata_]select_t
[linux-2.6-omap-h63xx.git] / drivers / ide / legacy / ide-4drives.c
index 89c8ff0a4d085f81e89bffba2fc3ba12a89f97c2..9e85b1ec9607604178a6a99419b2449516027f5d 100644 (file)
@@ -14,7 +14,7 @@ MODULE_PARM_DESC(probe, "probe for generic IDE chipset with 4 drives/port");
 static void ide_4drives_init_dev(ide_drive_t *drive)
 {
        if (drive->hwif->channel)
-               drive->select.all ^= 0x20;
+               drive->select ^= 0x20;
 }
 
 static const struct ide_port_ops ide_4drives_port_ops = {
@@ -28,10 +28,8 @@ static const struct ide_port_info ide_4drives_port_info = {
 
 static int __init ide_4drives_init(void)
 {
-       ide_hwif_t *hwif, *mate;
        unsigned long base = 0x1f0, ctl = 0x3f6;
-       u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };
-       hw_regs_t hw;
+       hw_regs_t hw, *hws[] = { &hw, &hw, NULL, NULL };
 
        if (probe_4drives == 0)
                return -ENODEV;
@@ -55,21 +53,7 @@ static int __init ide_4drives_init(void)
        hw.irq = 14;
        hw.chipset = ide_4drives;
 
-       hwif = ide_find_port();
-       if (hwif) {
-               ide_init_port_hw(hwif, &hw);
-               idx[0] = hwif->index;
-       }
-
-       mate = ide_find_port();
-       if (mate) {
-               ide_init_port_hw(mate, &hw);
-               idx[1] = mate->index;
-       }
-
-       ide_device_add(idx, &ide_4drives_port_info);
-
-       return 0;
+       return ide_host_add(&ide_4drives_port_info, hws, NULL);
 }
 
 module_init(ide_4drives_init);