aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-generic.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide-generic.c')
-rw-r--r--drivers/ide/ide-generic.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/ide/ide-generic.c b/drivers/ide/ide-generic.c
index be469dbbe8fb..709b9e4d2871 100644
--- a/drivers/ide/ide-generic.c
+++ b/drivers/ide/ide-generic.c
@@ -20,8 +20,14 @@ static int __init ide_generic_init(void)
20 if (ide_hwifs[0].io_ports[IDE_DATA_OFFSET]) 20 if (ide_hwifs[0].io_ports[IDE_DATA_OFFSET])
21 ide_get_lock(NULL, NULL); /* for atari only */ 21 ide_get_lock(NULL, NULL); /* for atari only */
22 22
23 for (i = 0; i < MAX_HWIFS; i++) 23 for (i = 0; i < MAX_HWIFS; i++) {
24 idx[i] = ide_hwifs[i].present ? 0xff : i; 24 ide_hwif_t *hwif = &ide_hwifs[i];
25
26 if (hwif->io_ports[IDE_DATA_OFFSET] && !hwif->present)
27 idx[i] = i;
28 else
29 idx[i] = 0xff;
30 }
25 31
26 ide_device_add_all(idx, NULL); 32 ide_device_add_all(idx, NULL);
27 33