aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/legacy/ali14xx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/legacy/ali14xx.c')
-rw-r--r--drivers/ide/legacy/ali14xx.c28
1 files changed, 1 insertions, 27 deletions
diff --git a/drivers/ide/legacy/ali14xx.c b/drivers/ide/legacy/ali14xx.c
index a940784d5796..24bd7838aec5 100644
--- a/drivers/ide/legacy/ali14xx.c
+++ b/drivers/ide/legacy/ali14xx.c
@@ -205,10 +205,6 @@ static const struct ide_port_info ali14xx_port_info = {
205 205
206static int __init ali14xx_probe(void) 206static int __init ali14xx_probe(void)
207{ 207{
208 ide_hwif_t *hwif, *mate;
209 static u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };
210 hw_regs_t hw[2];
211
212 printk(KERN_DEBUG "ali14xx: base=0x%03x, regOn=0x%02x.\n", 208 printk(KERN_DEBUG "ali14xx: base=0x%03x, regOn=0x%02x.\n",
213 basePort, regOn); 209 basePort, regOn);
214 210
@@ -218,29 +214,7 @@ static int __init ali14xx_probe(void)
218 return 1; 214 return 1;
219 } 215 }
220 216
221 memset(&hw, 0, sizeof(hw)); 217 return ide_legacy_device_add(&ali14xx_port_info);
222
223 ide_std_init_ports(&hw[0], 0x1f0, 0x3f6);
224 hw[0].irq = 14;
225
226 ide_std_init_ports(&hw[1], 0x170, 0x376);
227 hw[1].irq = 15;
228
229 hwif = ide_find_port();
230 if (hwif) {
231 ide_init_port_hw(hwif, &hw[0]);
232 idx[0] = hwif->index;
233 }
234
235 mate = ide_find_port();
236 if (mate) {
237 ide_init_port_hw(mate, &hw[1]);
238 idx[1] = mate->index;
239 }
240
241 ide_device_add(idx, &ali14xx_port_info);
242
243 return 0;
244} 218}
245 219
246int probe_ali14xx; 220int probe_ali14xx;