diff options
author | Mika Westerberg <mika.westerberg@linux.intel.com> | 2017-10-13 21:35:41 +0300 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2017-11-06 18:48:58 -0600 |
commit | 95e3ba9772331502cc33f1e1d4a96f3310e2f31e (patch) | |
tree | bef843c0160f1651a68b46e062cdb9c1dc400b52 /drivers/pci/hotplug-pci.c | |
parent | 24a0c654d7d6063301c51361f911369264342b3c (diff) | |
download | linux-stable-95e3ba9772331502cc33f1e1d4a96f3310e2f31e.tar.gz linux-stable-95e3ba9772331502cc33f1e1d4a96f3310e2f31e.tar.bz2 linux-stable-95e3ba9772331502cc33f1e1d4a96f3310e2f31e.zip |
PCI: Move pci_hp_add_bridge() to drivers/pci/probe.c
There is not much point of having a file with a single function in it.
Instead we can just move pci_hp_add_bridge() to drivers/pci/probe.c and
make it available always when PCI core is enabled.
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
[bhelgaas: convert printk to dev_err()]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/hotplug-pci.c')
-rw-r--r-- | drivers/pci/hotplug-pci.c | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/drivers/pci/hotplug-pci.c b/drivers/pci/hotplug-pci.c deleted file mode 100644 index c68366cee6b7..000000000000 --- a/drivers/pci/hotplug-pci.c +++ /dev/null @@ -1,29 +0,0 @@ -/* Core PCI functionality used only by PCI hotplug */ - -#include <linux/pci.h> -#include <linux/export.h> -#include "pci.h" - -int pci_hp_add_bridge(struct pci_dev *dev) -{ - struct pci_bus *parent = dev->bus; - int pass, busnr, start = parent->busn_res.start; - int end = parent->busn_res.end; - - for (busnr = start; busnr <= end; busnr++) { - if (!pci_find_bus(pci_domain_nr(parent), busnr)) - break; - } - if (busnr-- > end) { - printk(KERN_ERR "No bus number available for hot-added bridge %s\n", - pci_name(dev)); - return -1; - } - for (pass = 0; pass < 2; pass++) - busnr = pci_scan_bridge(parent, dev, busnr, pass); - if (!dev->subordinate) - return -1; - - return 0; -} -EXPORT_SYMBOL_GPL(pci_hp_add_bridge); |