diff options
Diffstat (limited to 'drivers/ide/legacy/macide.c')
-rw-r--r-- | drivers/ide/legacy/macide.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/ide/legacy/macide.c b/drivers/ide/legacy/macide.c index 0a6195bcfed..a0bb167980e 100644 --- a/drivers/ide/legacy/macide.c +++ b/drivers/ide/legacy/macide.c | |||
@@ -91,11 +91,10 @@ static const char *mac_ide_name[] = | |||
91 | 91 | ||
92 | static int __init macide_init(void) | 92 | static int __init macide_init(void) |
93 | { | 93 | { |
94 | ide_hwif_t *hwif; | ||
95 | ide_ack_intr_t *ack_intr; | 94 | ide_ack_intr_t *ack_intr; |
96 | unsigned long base; | 95 | unsigned long base; |
97 | int irq; | 96 | int irq; |
98 | hw_regs_t hw; | 97 | hw_regs_t hw, *hws[] = { &hw, NULL, NULL, NULL }; |
99 | 98 | ||
100 | if (!MACH_IS_MAC) | 99 | if (!MACH_IS_MAC) |
101 | return -ENODEV; | 100 | return -ENODEV; |
@@ -125,17 +124,7 @@ static int __init macide_init(void) | |||
125 | 124 | ||
126 | macide_setup_ports(&hw, base, irq, ack_intr); | 125 | macide_setup_ports(&hw, base, irq, ack_intr); |
127 | 126 | ||
128 | hwif = ide_find_port(); | 127 | return ide_host_add(NULL, hws, NULL); |
129 | if (hwif) { | ||
130 | u8 index = hwif->index; | ||
131 | u8 idx[4] = { index, 0xff, 0xff, 0xff }; | ||
132 | |||
133 | ide_init_port_hw(hwif, &hw); | ||
134 | |||
135 | ide_device_add(idx, NULL); | ||
136 | } | ||
137 | |||
138 | return 0; | ||
139 | } | 128 | } |
140 | 129 | ||
141 | module_init(macide_init); | 130 | module_init(macide_init); |