Skip to content

Commit d7169a9

Browse files
robherringLorenzo Pieralisi
authored andcommitted
PCI: v3: Use pci_host_probe() to register host
The v3 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: Linus Walleij <[email protected]> Cc: Linus Walleij <[email protected]>
1 parent 67047e8 commit d7169a9

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

drivers/pci/controller/pci-v3-semi.c

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,6 @@ struct v3_pci {
239239
struct device *dev;
240240
void __iomem *base;
241241
void __iomem *config_base;
242-
struct pci_bus *bus;
243242
u32 config_mem;
244243
u32 non_pre_mem;
245244
u32 pre_mem;
@@ -904,17 +903,7 @@ static int v3_pci_probe(struct platform_device *pdev)
904903
val |= V3_SYSTEM_M_LOCK;
905904
writew(val, v3->base + V3_SYSTEM);
906905

907-
ret = pci_scan_root_bus_bridge(host);
908-
if (ret) {
909-
dev_err(dev, "failed to register host: %d\n", ret);
910-
return ret;
911-
}
912-
v3->bus = host->bus;
913-
914-
pci_bus_assign_resources(v3->bus);
915-
pci_bus_add_devices(v3->bus);
916-
917-
return 0;
906+
return pci_host_probe(host);
918907
}
919908

920909
static const struct of_device_id v3_pci_of_match[] = {

0 commit comments

Comments
 (0)