diff options
author | Rob Herring <robh@kernel.org> | 2020-05-22 17:48:31 -0600 |
---|---|---|
committer | Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> | 2020-07-10 11:50:23 +0100 |
commit | dd58950f9875ab33b5c2499a1add592800fe703d (patch) | |
tree | 9e5a07c54f98d73a48869799bf04254c35f4e769 | |
parent | f473182c7524ddc04b5fc0aeb246ac102cf6edb5 (diff) | |
download | linux-dd58950f9875ab33b5c2499a1add592800fe703d.tar.gz linux-dd58950f9875ab33b5c2499a1add592800fe703d.tar.bz2 linux-dd58950f9875ab33b5c2499a1add592800fe703d.zip |
PCI: xilinx-nwl: Use pci_host_probe() to register host
The xilinx-nwl host driver does the same host registration and bus scanning
calls as pci_host_probe, so let's use it instead.
The only difference is pci_assign_unassigned_bus_resources() was called
instead of pci_bus_size_bridges() and pci_bus_assign_resources(). This
should be the same.
Link: https://lore.kernel.org/r/20200522234832.954484-15-robh@kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Michal Simek <michal.simek@xilinx.com>
-rw-r--r-- | drivers/pci/controller/pcie-xilinx-nwl.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/pci/controller/pcie-xilinx-nwl.c b/drivers/pci/controller/pcie-xilinx-nwl.c index 9bd1427f2fd6..32a0b08d6da5 100644 --- a/drivers/pci/controller/pcie-xilinx-nwl.c +++ b/drivers/pci/controller/pcie-xilinx-nwl.c @@ -817,8 +817,6 @@ static int nwl_pcie_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct nwl_pcie *pcie; - struct pci_bus *bus; - struct pci_bus *child; struct pci_host_bridge *bridge; int err; @@ -871,17 +869,7 @@ static int nwl_pcie_probe(struct platform_device *pdev) } } - err = pci_scan_root_bus_bridge(bridge); - if (err) - return err; - - bus = bridge->bus; - - pci_assign_unassigned_bus_resources(bus); - list_for_each_entry(child, &bus->children, node) - pcie_bus_configure_settings(child); - pci_bus_add_devices(bus); - return 0; + return pci_host_probe(bridge); } static struct platform_driver nwl_pcie_driver = { |