diff options
author | Yinghai Lu <yinghai@kernel.org> | 2012-09-17 22:14:42 -0700 |
---|---|---|
committer | Yinghai Lu <yinghai@kernel.org> | 2012-09-17 22:14:42 -0700 |
commit | 5c76ca3c0a80e3bdd749d605eda1c7d3febcf324 (patch) | |
tree | 63d44a2b83b3c606f1774fd962ff0a8923ea8821 | |
parent | 410161572f906e49e8a8a85ee80a5f8ec7d582ef (diff) | |
download | linux-yinghai-5c76ca3c0a80e3bdd749d605eda1c7d3febcf324.tar.gz |
PCI: Move back pci_rescan_bus() to probe.c
We have pci_assign_unassigned_bus_resources() in as global function now.
So could move back pci_rescan_bus to probe.c where it should be.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
-rw-r--r-- | drivers/pci/probe.c | 21 | ||||
-rw-r--r-- | drivers/pci/setup-bus.c | 22 |
2 files changed, 21 insertions, 22 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 23961117663f83..47238dd0e05e56 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -1888,6 +1888,27 @@ unsigned int __ref pci_rescan_bus_bridge_resize(struct pci_dev *bridge) return max; } +/** + * pci_rescan_bus - scan a PCI bus for devices. + * @bus: PCI bus to scan + * + * Scan a PCI bus and child buses for new devices, adds them, + * and enables them. + * + * Returns the max number of subordinate bus discovered. + */ +unsigned int __ref pci_rescan_bus(struct pci_bus *bus) +{ + unsigned int max; + + max = pci_scan_child_bus(bus); + pci_assign_unassigned_bus_resources(bus); + pci_bus_add_devices(bus); + + return max; +} +EXPORT_SYMBOL_GPL(pci_rescan_bus); + EXPORT_SYMBOL(pci_add_new_bus); EXPORT_SYMBOL(pci_scan_slot); EXPORT_SYMBOL(pci_scan_bridge); diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 7d7c1c9d7780b0..31821d463fac15 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c @@ -1569,25 +1569,3 @@ void pci_assign_unassigned_bus_resources(struct pci_bus *bus) pci_enable_bridges(bus); } -#ifdef CONFIG_HOTPLUG -/** - * pci_rescan_bus - scan a PCI bus for devices. - * @bus: PCI bus to scan - * - * Scan a PCI bus and child buses for new devices, adds them, - * and enables them. - * - * Returns the max number of subordinate bus discovered. - */ -unsigned int __ref pci_rescan_bus(struct pci_bus *bus) -{ - unsigned int max; - - max = pci_scan_child_bus(bus); - pci_assign_unassigned_bus_resources(bus); - pci_bus_add_devices(bus); - - return max; -} -EXPORT_SYMBOL_GPL(pci_rescan_bus); -#endif |