Skip to content

Commit 56d2923

Browse files
robherringLorenzo Pieralisi
authored andcommitted
PCI: rcar: Use pci_host_probe() to register host
The rcar 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]> Reviewed-by: Geert Uytterhoeven <[email protected]> Cc: Marek Vasut <[email protected]> Cc: Yoshihiro Shimoda <[email protected]> Cc: [email protected]
1 parent 81ce3cf commit 56d2923

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

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

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -330,8 +330,6 @@ static int rcar_pcie_enable(struct rcar_pcie_host *host)
330330
struct pci_host_bridge *bridge = pci_host_bridge_from_priv(host);
331331
struct rcar_pcie *pcie = &host->pcie;
332332
struct device *dev = pcie->dev;
333-
struct pci_bus *bus, *child;
334-
int ret;
335333

336334
/* Try setting 5 GT/s link speed */
337335
rcar_pcie_force_speedup(pcie);
@@ -349,21 +347,7 @@ static int rcar_pcie_enable(struct rcar_pcie_host *host)
349347
if (IS_ENABLED(CONFIG_PCI_MSI))
350348
bridge->msi = &host->msi.chip;
351349

352-
ret = pci_scan_root_bus_bridge(bridge);
353-
if (ret < 0)
354-
return ret;
355-
356-
bus = bridge->bus;
357-
358-
pci_bus_size_bridges(bus);
359-
pci_bus_assign_resources(bus);
360-
361-
list_for_each_entry(child, &bus->children, node)
362-
pcie_bus_configure_settings(child);
363-
364-
pci_bus_add_devices(bus);
365-
366-
return 0;
350+
return pci_host_probe(bridge);
367351
}
368352

369353
static int phy_wait_for_ack(struct rcar_pcie *pcie)

0 commit comments

Comments
 (0)