On Fri, Aug 17, 2012 at 4:36 PM, Bjorn Helgaas <bhelgaas@xxxxxxxxxx> wrote: > 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@xxxxxxxxxx> > --- > drivers/pcmcia/cardbus.c | 7 +++++-- > 1 files changed, 5 insertions(+), 2 deletions(-) > > diff --git a/drivers/pcmcia/cardbus.c b/drivers/pcmcia/cardbus.c > index 24caeaf..94f87b5 100644 > --- a/drivers/pcmcia/cardbus.c > +++ b/drivers/pcmcia/cardbus.c > @@ -106,7 +106,10 @@ int __ref cb_alloc(struct pcmcia_socket *s) > void cb_free(struct pcmcia_socket *s) > { > struct pci_dev *bridge = s->cb_dev; > + struct pci_bus *bus = bridge->subordinate; > + struct pci_dev *dev, *tmp; > > - if (bridge) > - pci_stop_and_remove_behind_bridge(bridge); > + if (bus) > + list_for_each_entry_safe(dev, tmp, &bus->devices, bus_list) > + pci_stop_and_remove_bus_device(dev); > } > original looks like bridge could be NULL. Yinghai -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html