aboutsummaryrefslogtreecommitdiff
path: root/drivers/pci/hotplug-pci.c
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2008-02-02 22:32:23 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2008-02-02 15:04:30 -0800
commit4105717bc98ba01663ff28f8a16d8716ba9d07fe (patch)
treeadfb3486587a21894035e31ceab84c1c44b8529f /drivers/pci/hotplug-pci.c
parentd5f78fb0c8ab7f929f94fa4087a2397ac8d29a30 (diff)
PCI: fix section mismatch warnings referring to pci_do_scan_bus
Fix following warnings: WARNING: o-x86_64/drivers/pci/built-in.o(.text+0xb054): Section mismatch in reference from the function cpci_configure_slot() to the function .devinit.text:pci_do_scan_bus() WARNING: o-x86_64/drivers/pci/built-in.o(.text+0x153ab): Section mismatch in reference from the function shpchp_configure_device() to the function .devinit.text:pci_do_scan_bus() WARNING: o-x86_64/drivers/pci/built-in.o(__ksymtab+0xc0): Section mismatch in reference from the variable __ksymtab_pci_do_scan_bus to the function .devinit.text:pci_do_scan_bus() PCI hotplug were the only user of pci_do_scan_bus() so moving this function to a separate file that is build only when we enable CONFIG_HOTPLUG_PCI. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Adrian Bunk <bunk@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci/hotplug-pci.c')
-rw-r--r--drivers/pci/hotplug-pci.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/pci/hotplug-pci.c b/drivers/pci/hotplug-pci.c
new file mode 100644
index 00000000000..a590ef68215
--- /dev/null
+++ b/drivers/pci/hotplug-pci.c
@@ -0,0 +1,20 @@
+/* Core PCI functionality used only by PCI hotplug */
+
+#include <linux/pci.h>
+#include "pci.h"
+
+
+unsigned int pci_do_scan_bus(struct pci_bus *bus)
+{
+ unsigned int max;
+
+ max = pci_scan_child_bus(bus);
+
+ /*
+ * Make the discovered devices available.
+ */
+ pci_bus_add_devices(bus);
+
+ return max;
+}
+EXPORT_SYMBOL(pci_do_scan_bus);