lkml.org 
[lkml]   [2005]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 2.6.13-rc2] pci: fix PCI && !HOTPLUG compile error
2.6.13-rc2 triggers compile errors in pci-driver.c
when hotplug is disabled:

drivers/pci/pci-driver.c: In function 'pci_match_device':
drivers/pci/pci-driver.c:156: error: dereferencing pointer to incomplete type
drivers/pci/pci-driver.c:156: warning: type defaults to 'int' in declaration of 'type name'
drivers/pci/pci-driver.c:156: error: request for member 'node' in something not a structure or union
drivers/pci/pci-driver.c:156: warning: type defaults to 'int' in declaration of '__mptr'
drivers/pci/pci-driver.c:156: warning: initialization from incompatible pointer type
etc

This is because 2.6.13-rc2 added a code block to this function which references
hotplug-only stuff. Fixed crudely by #ifdef CONFIG_HOTPLUG around it.

Signed-off-by: Mikael Pettersson <mikpe@csd.uu.se>

--- linux-2.6.13-rc2/drivers/pci/pci-driver.c.~1~ 2005-07-06 15:20:41.000000000 +0200
+++ linux-2.6.13-rc2/drivers/pci/pci-driver.c 2005-07-06 15:49:18.000000000 +0200
@@ -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
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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-07-06 22:05    [W:0.026 / U:0.656 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site