aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/pci/remove.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/pci/remove.c b/drivers/pci/remove.c
index 7f87beed35ac..6def3624c688 100644
--- a/drivers/pci/remove.c
+++ b/drivers/pci/remove.c
@@ -89,9 +89,8 @@ EXPORT_SYMBOL(pci_remove_bus);
89 * device lists, remove the /proc entry, and notify userspace 89 * device lists, remove the /proc entry, and notify userspace
90 * (/sbin/hotplug). 90 * (/sbin/hotplug).
91 */ 91 */
92void pci_remove_bus_device(struct pci_dev *dev) 92static void __pci_remove_bus_device(struct pci_dev *dev)
93{ 93{
94 pci_stop_bus_device(dev);
95 if (dev->subordinate) { 94 if (dev->subordinate) {
96 struct pci_bus *b = dev->subordinate; 95 struct pci_bus *b = dev->subordinate;
97 96
@@ -102,6 +101,11 @@ void pci_remove_bus_device(struct pci_dev *dev)
102 101
103 pci_destroy_dev(dev); 102 pci_destroy_dev(dev);
104} 103}
104void pci_remove_bus_device(struct pci_dev *dev)
105{
106 pci_stop_bus_device(dev);
107 __pci_remove_bus_device(dev);
108}
105 109
106/** 110/**
107 * pci_remove_behind_bridge - remove all devices behind a PCI bridge 111 * pci_remove_behind_bridge - remove all devices behind a PCI bridge
@@ -117,7 +121,7 @@ void pci_remove_behind_bridge(struct pci_dev *dev)
117 121
118 if (dev->subordinate) 122 if (dev->subordinate)
119 list_for_each_safe(l, n, &dev->subordinate->devices) 123 list_for_each_safe(l, n, &dev->subordinate->devices)
120 pci_remove_bus_device(pci_dev_b(l)); 124 __pci_remove_bus_device(pci_dev_b(l));
121} 125}
122 126
123static void pci_stop_bus_devices(struct pci_bus *bus) 127static void pci_stop_bus_devices(struct pci_bus *bus)