Skip to contentSkip to conversation

Small compile fix to ide.c with !CONFIG_PCI

PATCH Applied Mika Kukkonen 2 participants 2 messages Feb 10, 2005 – Feb 20, 2005 libata

lore
Share & tools
lore
#0 lore raw

Hi!

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 ;-).

--MiKu

drivers/ide/ide.c 2005-02-10 09:45:34.000000000 +0200 renamed from drivers/ide/ide.c +1 -0
@@ -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) {