PCI: Remove pci_stop_and_remove_behind_bridge()
authorBjorn Helgaas <bhelgaas@google.com>
Fri, 17 Aug 2012 17:07:49 +0000 (11:07 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 22 Aug 2012 17:31:32 +0000 (11:31 -0600)
The PCMCIA CardBus driver was the only user of
pci_stop_and_remove_behind_bridge(), and it now uses
pci_stop_and_remove_bus_device() instead, so remove this interface.

This removes exported symbol pci_stop_and_remove_behind_bridge.

Tested-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Yinghai Lu <yinghai@kernel.org>
drivers/pci/remove.c
include/linux/pci.h

index 534377f..b18dc2e 100644 (file)
@@ -121,30 +121,6 @@ static void __pci_remove_behind_bridge(struct pci_dev *dev)
                        __pci_remove_bus_device(pci_dev_b(l));
 }
 
-static void pci_stop_behind_bridge(struct pci_dev *dev)
-{
-       struct list_head *l, *n;
-
-       if (dev->subordinate)
-               list_for_each_safe(l, n, &dev->subordinate->devices)
-                       pci_stop_bus_device(pci_dev_b(l));
-}
-
-/**
- * pci_stop_and_remove_behind_bridge - stop and remove all devices behind
- *                                      a PCI bridge
- * @dev: PCI bridge device
- *
- * Remove all devices on the bus, except for the parent bridge.
- * This also removes any child buses, and any devices they may
- * contain in a depth-first manner.
- */
-void pci_stop_and_remove_behind_bridge(struct pci_dev *dev)
-{
-       pci_stop_behind_bridge(dev);
-       __pci_remove_behind_bridge(dev);
-}
-
 static void pci_stop_bus_devices(struct pci_bus *bus)
 {
        struct list_head *l, *n;
@@ -180,4 +156,3 @@ static void pci_stop_bus_device(struct pci_dev *dev)
 }
 
 EXPORT_SYMBOL(pci_stop_and_remove_bus_device);
-EXPORT_SYMBOL(pci_stop_and_remove_behind_bridge);
index 54b5b2b..1dce47c 100644 (file)
@@ -1011,7 +1011,6 @@ void pci_unregister_driver(struct pci_driver *dev);
        module_driver(__pci_driver, pci_register_driver, \
                       pci_unregister_driver)
 
-void pci_stop_and_remove_behind_bridge(struct pci_dev *dev);
 struct pci_driver *pci_dev_driver(const struct pci_dev *dev);
 int pci_add_dynid(struct pci_driver *drv,
                  unsigned int vendor, unsigned int device,