aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2012-08-17 12:49:04 -0400
committerBjorn Helgaas <bhelgaas@google.com>2012-08-22 13:31:20 -0400
commit0a140577316268b3263fd169d339188ad1636af3 (patch)
tree35fc228275fde995554bc69a304938bee3303bfb /drivers/pcmcia
parent34e548431a7a2e73121c4a452eb3d1b0659bd77f (diff)
pcmcia: Use common pci_stop_and_remove_bus_device()
Use pci_stop_and_remove_bus_device() like most other hotplug drivers rather than the special-purpose "behind_bridge" variant. This just means we have to iterate through all the devices downstream of the bridge ourselves, which is the same thing pci_stop_behind_bridge() did. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Yinghai Lu <yinghai@kernel.org>
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r--drivers/pcmcia/cardbus.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/pcmcia/cardbus.c b/drivers/pcmcia/cardbus.c
index 24caeaf5052..9d3ac998fc1 100644
--- a/drivers/pcmcia/cardbus.c
+++ b/drivers/pcmcia/cardbus.c
@@ -105,8 +105,17 @@ int __ref cb_alloc(struct pcmcia_socket *s)
105 */ 105 */
106void cb_free(struct pcmcia_socket *s) 106void cb_free(struct pcmcia_socket *s)
107{ 107{
108 struct pci_dev *bridge = s->cb_dev; 108 struct pci_dev *bridge, *dev, *tmp;
109 struct pci_bus *bus;
109 110
110 if (bridge) 111 bridge = s->cb_dev;
111 pci_stop_and_remove_behind_bridge(bridge); 112 if (!bridge)
113 return;
114
115 bus = bridge->subordinate;
116 if (!bus)
117 return;
118
119 list_for_each_entry_safe(dev, tmp, &bus->devices, bus_list)
120 pci_stop_and_remove_bus_device(dev);
112} 121}