]> git.hungrycats.org Git - linux/commitdiff
[ide] small compile fix to ide.c with !CONFIG_PCI
authorMika Kukkonen <mikukkon@gmail.com>
Sun, 20 Feb 2005 15:51:35 +0000 (16:51 +0100)
committerBartlomiej Zolnierkiewicz <bzolnier@trik.(none)>
Sun, 20 Feb 2005 15:51:35 +0000 (16:51 +0100)
Small patch to fix following warning with CONFIG_IDE && !CONFIG_PCI:

  CC drivers/ide/ide.o
drivers/ide/ide.c: In function 'ide_system_bus_speed':
drivers/ide/ide.c:338: warning: unused variable 'pci_default'

I decided to save some bytes by #ifdef:ing the struct in question.
CC:ing Hanna because she did the change (and just to say hi ;-).

Signed-off-by: Mika Kukkonen <mikukkon@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
drivers/ide/ide.c

index bb9960601096180ac87179bb6b09960612b431c0..15b643afc11807adc8e79e7e2b044e47c8b22da3 100644 (file)
@@ -335,10 +335,14 @@ static void __init init_ide_data (void)
 
 static int ide_system_bus_speed(void)
 {
+#ifdef CONFIG_PCI
        static struct pci_device_id pci_default[] = {
                { PCI_DEVICE(PCI_ANY_ID, PCI_ANY_ID) },
                { }
        };
+#else
+#define pci_default 0
+#endif /* CONFIG_PCI */
 
        if (!system_bus_speed) {
                if (idebus_parameter) {