Skip to content

Commit a4b21b8

Browse files
robherringLorenzo Pieralisi
authored andcommitted
PCI: versatile: Use pci_host_probe() to register host
The versatile 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: Lorenzo Pieralisi <[email protected]>
1 parent d7169a9 commit a4b21b8

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

drivers/pci/controller/pci-versatile.c

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ static int versatile_pci_probe(struct platform_device *pdev)
7070
int ret, i, myslot = -1, mem = 1;
7171
u32 val;
7272
void __iomem *local_pci_cfg_base;
73-
struct pci_bus *bus, *child;
7473
struct pci_host_bridge *bridge;
7574

7675
bridge = devm_pci_alloc_host_bridge(dev, 0);
@@ -164,18 +163,7 @@ static int versatile_pci_probe(struct platform_device *pdev)
164163
bridge->map_irq = of_irq_parse_and_map_pci;
165164
bridge->swizzle_irq = pci_common_swizzle;
166165

167-
ret = pci_scan_root_bus_bridge(bridge);
168-
if (ret < 0)
169-
return ret;
170-
171-
bus = bridge->bus;
172-
173-
pci_assign_unassigned_bus_resources(bus);
174-
list_for_each_entry(child, &bus->children, node)
175-
pcie_bus_configure_settings(child);
176-
pci_bus_add_devices(bus);
177-
178-
return 0;
166+
return pci_host_probe(bridge);
179167
}
180168

181169
static const struct of_device_id versatile_pci_of_match[] = {

0 commit comments

Comments
 (0)