Skip to content

Commit dd58950

Browse files
robherringLorenzo Pieralisi
authored andcommitted
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/[email protected] Signed-off-by: Rob Herring <[email protected]> Signed-off-by: Lorenzo Pieralisi <[email protected]> Cc: Michal Simek <[email protected]>
1 parent f473182 commit dd58950

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

drivers/pci/controller/pcie-xilinx-nwl.c

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -817,8 +817,6 @@ static int nwl_pcie_probe(struct platform_device *pdev)
817817
{
818818
struct device *dev = &pdev->dev;
819819
struct nwl_pcie *pcie;
820-
struct pci_bus *bus;
821-
struct pci_bus *child;
822820
struct pci_host_bridge *bridge;
823821
int err;
824822

@@ -871,17 +869,7 @@ static int nwl_pcie_probe(struct platform_device *pdev)
871869
}
872870
}
873871

874-
err = pci_scan_root_bus_bridge(bridge);
875-
if (err)
876-
return err;
877-
878-
bus = bridge->bus;
879-
880-
pci_assign_unassigned_bus_resources(bus);
881-
list_for_each_entry(child, &bus->children, node)
882-
pcie_bus_configure_settings(child);
883-
pci_bus_add_devices(bus);
884-
return 0;
872+
return pci_host_probe(bridge);
885873
}
886874

887875
static struct platform_driver nwl_pcie_driver = {

0 commit comments

Comments
 (0)