Commit dd58950f authored by Rob Herring's avatar Rob Herring Committed by Lorenzo Pieralisi

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.orgSigned-off-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Michal Simek <michal.simek@xilinx.com>
parent f473182c
...@@ -817,8 +817,6 @@ static int nwl_pcie_probe(struct platform_device *pdev) ...@@ -817,8 +817,6 @@ static int nwl_pcie_probe(struct platform_device *pdev)
{ {
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
struct nwl_pcie *pcie; struct nwl_pcie *pcie;
struct pci_bus *bus;
struct pci_bus *child;
struct pci_host_bridge *bridge; struct pci_host_bridge *bridge;
int err; int err;
...@@ -871,17 +869,7 @@ static int nwl_pcie_probe(struct platform_device *pdev) ...@@ -871,17 +869,7 @@ static int nwl_pcie_probe(struct platform_device *pdev)
} }
} }
err = pci_scan_root_bus_bridge(bridge); return pci_host_probe(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;
} }
static struct platform_driver nwl_pcie_driver = { static struct platform_driver nwl_pcie_driver = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment