Fix 2.6.13rc2 compilation without CONFIG_HOTPLUG
PATCH 1/1 Fix 2.6.13rc2 compilation without CONFIG_HOTPLUG
Otherwise PCI won't compile.
Signed-off-by Andi Kleen <[email protected]>
drivers/pci/pci-driver.c +4 -0
@@ -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 ; }
Quoted 4 lines · Andi Kleen
Otherwise PCI won't compile.
Signed-off-by Andi Kleen <[email protected]>
No, I like this patch better, it's cleaner and is what I intended the code to be. I've already sent it to Linus and the list.
thanks,
greg k-h
Signed-off-by Greg Kroah-Hartman <[email protected]>
--- drivers/pci/pci-driver.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/pci/pci-driver.c +2 -2
@@ -17,13 +17,13 @@* Dynamic device IDs are disabled for !CONFIG_HOTPLUG */ -#ifdef CONFIG_HOTPLUG -struct pci_dynid {struct list_head node;struct pci_device_id id; }; +#ifdef CONFIG_HOTPLUG +/** * store_new_id *