[PATCH] Fix 2.6.13rc2 compilation without CONFIG_HOTPLUG

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Otherwise PCI won't compile.

Signed-off-by: Andi Kleen <[email protected]>

Index: linux/drivers/pci/pci-driver.c
===================================================================
--- linux.orig/drivers/pci/pci-driver.c
+++ linux/drivers/pci/pci-driver.c
@@ -145,12 +145,15 @@ const struct pci_device_id *pci_match_de
 					     struct pci_dev *dev)
 {
 	const struct pci_device_id *id;
+#ifdef CONFIG_HOTPLUG  /* A kingdom for C99 */
 	struct pci_dynid *dynid;
+#endif
 
 	id = pci_match_id(drv->id_table, dev);
 	if (id)
 		return id;
 
+#ifdef CONFIG_HOTPLUG
 	/* static ids didn't match, lets look at the dynamic ones */
 	spin_lock(&drv->dynids.lock);
 	list_for_each_entry(dynid, &drv->dynids.list, node) {
@@ -160,6 +163,7 @@ const struct pci_device_id *pci_match_de
 		}
 	}
 	spin_unlock(&drv->dynids.lock);
+#endif
 	return NULL;
 }
 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux