diff options
-rw-r--r-- | drivers/ide/ide-probe.c | 9 | ||||
-rw-r--r-- | drivers/ide/ide-proc.c | 3 |
2 files changed, 7 insertions, 5 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index abb695aa021d..1ef293757043 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c | |||
@@ -1448,8 +1448,13 @@ int ide_device_add_all(u8 *idx, const struct ide_port_info *d) | |||
1448 | } | 1448 | } |
1449 | 1449 | ||
1450 | for (i = 0; i < MAX_HWIFS; i++) { | 1450 | for (i = 0; i < MAX_HWIFS; i++) { |
1451 | if (idx[i] != 0xff) | 1451 | if (idx[i] == 0xff) |
1452 | ide_proc_register_port(&ide_hwifs[idx[i]]); | 1452 | continue; |
1453 | |||
1454 | hwif = &ide_hwifs[idx[i]]; | ||
1455 | |||
1456 | if (hwif->present) | ||
1457 | ide_proc_register_port(hwif); | ||
1453 | } | 1458 | } |
1454 | 1459 | ||
1455 | return rc; | 1460 | return rc; |
diff --git a/drivers/ide/ide-proc.c b/drivers/ide/ide-proc.c index 00c249cba236..c6ed84b84e8b 100644 --- a/drivers/ide/ide-proc.c +++ b/drivers/ide/ide-proc.c | |||
@@ -793,9 +793,6 @@ static ide_proc_entry_t hwif_entries[] = { | |||
793 | 793 | ||
794 | void ide_proc_register_port(ide_hwif_t *hwif) | 794 | void ide_proc_register_port(ide_hwif_t *hwif) |
795 | { | 795 | { |
796 | if (!hwif->present) | ||
797 | return; | ||
798 | |||
799 | if (!hwif->proc) { | 796 | if (!hwif->proc) { |
800 | hwif->proc = proc_mkdir(hwif->name, proc_ide_root); | 797 | hwif->proc = proc_mkdir(hwif->name, proc_ide_root); |
801 | 798 | ||