Skip to content

Commit 97c5372

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

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

drivers/pci/controller/pci-xgene.c

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,6 @@ static int xgene_pcie_probe(struct platform_device *pdev)
591591
struct device *dev = &pdev->dev;
592592
struct device_node *dn = dev->of_node;
593593
struct xgene_pcie_port *port;
594-
struct pci_bus *bus, *child;
595594
struct pci_host_bridge *bridge;
596595
int ret;
597596

@@ -632,17 +631,7 @@ static int xgene_pcie_probe(struct platform_device *pdev)
632631
bridge->map_irq = of_irq_parse_and_map_pci;
633632
bridge->swizzle_irq = pci_common_swizzle;
634633

635-
ret = pci_scan_root_bus_bridge(bridge);
636-
if (ret < 0)
637-
return ret;
638-
639-
bus = bridge->bus;
640-
641-
pci_assign_unassigned_bus_resources(bus);
642-
list_for_each_entry(child, &bus->children, node)
643-
pcie_bus_configure_settings(child);
644-
pci_bus_add_devices(bus);
645-
return 0;
634+
return pci_host_probe(bridge);
646635
}
647636

648637
static const struct of_device_id xgene_pcie_match_table[] = {

0 commit comments

Comments
 (0)