Skip to content

Commit 78aada4

Browse files
robherringLorenzo Pieralisi
authored andcommitted
PCI: xilinx: Use pci_host_probe() to register host
The xilinx 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 dd58950 commit 78aada4

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

drivers/pci/controller/pcie-xilinx.c

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,6 @@ static int xilinx_pcie_probe(struct platform_device *pdev)
616616
{
617617
struct device *dev = &pdev->dev;
618618
struct xilinx_pcie_port *port;
619-
struct pci_bus *bus, *child;
620619
struct pci_host_bridge *bridge;
621620
int err;
622621

@@ -663,17 +662,7 @@ static int xilinx_pcie_probe(struct platform_device *pdev)
663662
xilinx_pcie_msi_chip.dev = dev;
664663
bridge->msi = &xilinx_pcie_msi_chip;
665664
#endif
666-
err = pci_scan_root_bus_bridge(bridge);
667-
if (err < 0)
668-
return err;
669-
670-
bus = bridge->bus;
671-
672-
pci_assign_unassigned_bus_resources(bus);
673-
list_for_each_entry(child, &bus->children, node)
674-
pcie_bus_configure_settings(child);
675-
pci_bus_add_devices(bus);
676-
return 0;
665+
return pci_host_probe(bridge);
677666
}
678667

679668
static const struct of_device_id xilinx_pcie_of_match[] = {

0 commit comments

Comments
 (0)