]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/ide/setup-pci.c
[PATCH] Make number of IDE interfaces configurable
[mv-sheeva.git] / drivers / ide / setup-pci.c
index 462ed3006c3082124a0a9622dfa9e7448116cc09..157fe93ea34270288fbf46b7a32dbcf1f32674c4 100644 (file)
@@ -18,7 +18,6 @@
  *  configuration of all PCI IDE interfaces present in a system.  
  */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
@@ -102,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 */
@@ -694,13 +693,8 @@ static int do_ide_setup_pci_device(struct pci_dev *dev, ide_pci_device_t *d,
                                goto out;
                }
                if (noisy)
-#ifdef __sparc__
-                       printk(KERN_INFO "%s: 100%% native mode on irq %s\n",
-                              d->name, __irq_itoa(pciirq));
-#else
                        printk(KERN_INFO "%s: 100%% native mode on irq %d\n",
                                d->name, pciirq);
-#endif
        }
 
        /* FIXME: silent failure can happen */