Skip to content

Commit 1f9b751

Browse files
robherringLorenzo Pieralisi
authored andcommitted
PCI: mobiveil: Use pci_host_probe() to register host
The mobiveil host driver does the same host registration and bus scanning calls as pci_host_probe, so let's use it instead. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Rob Herring <[email protected]> Signed-off-by: Lorenzo Pieralisi <[email protected]> Cc: Karthikeyan Mitran <[email protected]> Cc: Hou Zhiqiang <[email protected]>
1 parent a37571f commit 1f9b751

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

drivers/pci/controller/mobiveil/pcie-mobiveil-host.c

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -569,8 +569,6 @@ int mobiveil_pcie_host_probe(struct mobiveil_pcie *pcie)
569569
struct mobiveil_root_port *rp = &pcie->rp;
570570
struct pci_host_bridge *bridge = rp->bridge;
571571
struct device *dev = &pcie->pdev->dev;
572-
struct pci_bus *bus;
573-
struct pci_bus *child;
574572
int ret;
575573

576574
ret = mobiveil_pcie_parse_dt(pcie);
@@ -620,17 +618,5 @@ int mobiveil_pcie_host_probe(struct mobiveil_pcie *pcie)
620618
return ret;
621619
}
622620

623-
/* setup the kernel resources for the newly added PCIe root bus */
624-
ret = pci_scan_root_bus_bridge(bridge);
625-
if (ret)
626-
return ret;
627-
628-
bus = bridge->bus;
629-
630-
pci_assign_unassigned_bus_resources(bus);
631-
list_for_each_entry(child, &bus->children, node)
632-
pcie_bus_configure_settings(child);
633-
pci_bus_add_devices(bus);
634-
635-
return 0;
621+
return pci_host_probe(bridge);
636622
}

0 commit comments

Comments
 (0)