aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ide/ide-probe.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index f3a56595eb75..75b79cc96339 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -1362,20 +1362,15 @@ int ide_host_register(struct ide_host *host, const struct ide_port_info *d,
1362 ide_init_port_hw(hwif, hws[i]); 1362 ide_init_port_hw(hwif, hws[i]);
1363 ide_port_apply_params(hwif); 1363 ide_port_apply_params(hwif);
1364 1364
1365 if (d == NULL) { 1365 if ((i & 1) && mate) {
1366 mate = NULL; 1366 hwif->mate = mate;
1367 } else { 1367 mate->mate = hwif;
1368 if ((i & 1) && mate) {
1369 hwif->mate = mate;
1370 mate->mate = hwif;
1371 }
1372
1373 mate = (i & 1) ? NULL : hwif;
1374
1375 ide_init_port(hwif, i & 1, d);
1376 ide_port_cable_detect(hwif);
1377 } 1368 }
1378 1369
1370 mate = (i & 1) ? NULL : hwif;
1371
1372 ide_init_port(hwif, i & 1, d);
1373 ide_port_cable_detect(hwif);
1379 ide_port_init_devices(hwif); 1374 ide_port_init_devices(hwif);
1380 } 1375 }
1381 1376