]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
PCI: Make pci_register_host_bridge() PCI core internal
authorLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Wed, 28 Jun 2017 20:13:55 +0000 (15:13 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 28 Jun 2017 20:13:55 +0000 (15:13 -0500)
With the introduction of pci_scan_root_bus_bridge() there is no need to
export pci_register_host_bridge() to other kernel subsystems other than the
PCI compilation unit that needs it.

Make pci_register_host_bridge() static to its compilation unit and convert
the existing drivers usage over to pci_scan_root_bus_bridge().

Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: Arnd Bergmann <arnd@arndb.de>
drivers/pci/host/pci-ftpci100.c
drivers/pci/host/pci-tegra.c
drivers/pci/probe.c
include/linux/pci.h

index ce5700eec1dae41328b94725fc3e3899df0e0240..2ee2ffb0a50b2e6acb7b765e43ff6f84734bbc35 100644 (file)
@@ -527,14 +527,13 @@ static int faraday_pci_probe(struct platform_device *pdev)
                return ret;
 
        list_splice_init(&res, &host->windows);
-       ret = pci_register_host_bridge(host);
+       ret = pci_scan_root_bus_bridge(host);
        if (ret) {
-               dev_err(dev, "failed to register host: %d\n", ret);
+               dev_err(dev, "failed to scan host: %d\n", ret);
                return ret;
        }
        p->bus = host->bus;
 
-       pci_scan_child_bus(p->bus);
        pci_fixup_irqs(pci_common_swizzle, of_irq_parse_and_map_pci);
        pci_bus_assign_resources(p->bus);
        pci_bus_add_devices(p->bus);
index 84c98a2bffeb0c1c64e652fd0fb9959d24997dd3..0383418457be872e439f5ec79dea87025c823190 100644 (file)
@@ -2285,14 +2285,12 @@ static int tegra_pcie_probe(struct platform_device *pdev)
        host->dev.parent = &pdev->dev;
        host->ops = &tegra_pcie_ops;
 
-       err = pci_register_host_bridge(host);
+       err = pci_scan_root_bus_bridge(host);
        if (err < 0) {
                dev_err(dev, "failed to register host: %d\n", err);
                goto disable_msi;
        }
 
-       pci_scan_child_bus(host->bus);
-
        pci_fixup_irqs(pci_common_swizzle, tegra_pcie_map_irq);
        pci_bus_size_bridges(host->bus);
        pci_bus_assign_resources(host->bus);
index 690f0b377a0f2b6664e3d03ecf1bf5148e1c76fc..5c457c17cf5c8b60cb16197265506b51c8178deb 100644 (file)
@@ -746,7 +746,7 @@ static void pci_set_bus_msi_domain(struct pci_bus *bus)
        dev_set_msi_domain(&bus->dev, d);
 }
 
-int pci_register_host_bridge(struct pci_host_bridge *bridge)
+static int pci_register_host_bridge(struct pci_host_bridge *bridge)
 {
        struct device *parent = bridge->dev.parent;
        struct resource_entry *window, *n;
@@ -861,7 +861,6 @@ free:
        kfree(bus);
        return err;
 }
-EXPORT_SYMBOL(pci_register_host_bridge);
 
 static struct pci_bus *pci_alloc_child_bus(struct pci_bus *parent,
                                           struct pci_dev *bridge, int busnr)
index fe1eafd637c3d5ade3d8008d2484ea193261955c..b56dc13f47c21b64e52b15180b67f80264d58820 100644 (file)
@@ -461,7 +461,6 @@ struct pci_host_bridge *pci_alloc_host_bridge(size_t priv);
 struct pci_host_bridge *devm_pci_alloc_host_bridge(struct device *dev,
                                                   size_t priv);
 void pci_free_host_bridge(struct pci_host_bridge *bridge);
-int pci_register_host_bridge(struct pci_host_bridge *bridge);
 struct pci_host_bridge *pci_find_host_bridge(struct pci_bus *bus);
 
 void pci_set_host_bridge_release(struct pci_host_bridge *bridge,