]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/ide/setup-pci.c
[PATCH] Make number of IDE interfaces configurable
[linux-2.6-omap-h63xx.git] / drivers / ide / setup-pci.c
index eb0945284accec16b4c0ff0075c504da59f34a35..157fe93ea34270288fbf46b7a32dbcf1f32674c4 100644 (file)
@@ -101,7 +101,7 @@ static ide_hwif_t *ide_match_hwif(unsigned long io_base, u8 bootable, const char
                                return hwif;    /* pick an unused entry */
                }
        }
-       for (h = 0; h < 2; ++h) {
+       for (h = 0; h < 2 && h < MAX_HWIFS; ++h) {
                hwif = ide_hwifs + h;
                if (hwif->chipset == ide_unknown)
                        return hwif;    /* pick an unused entry */