aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Herring2020-05-22 17:48:26 -0600
committerLorenzo Pieralisi2020-07-10 11:50:23 +0100
commit97c5372aeb5b43ab9d3f3db08652de8e8988b226 (patch)
tree8a2cd1da786085dce2d3807a698059741001ff8d
parenta4b21b858b56d728021ad72ad7c1322d8772b2a6 (diff)
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/20200522234832.954484-10-robh@kernel.org Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Cc: Toan Le <toan@os.amperecomputing.com>
-rw-r--r--drivers/pci/controller/pci-xgene.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/pci/controller/pci-xgene.c b/drivers/pci/controller/pci-xgene.c
index d1efa8ffbae1..5aee802946cb 100644
--- a/drivers/pci/controller/pci-xgene.c
+++ b/drivers/pci/controller/pci-xgene.c
@@ -591,7 +591,6 @@ static int xgene_pcie_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct device_node *dn = dev->of_node;
struct xgene_pcie_port *port;
- struct pci_bus *bus, *child;
struct pci_host_bridge *bridge;
int ret;
@@ -632,17 +631,7 @@ static int xgene_pcie_probe(struct platform_device *pdev)
bridge->map_irq = of_irq_parse_and_map_pci;
bridge->swizzle_irq = pci_common_swizzle;
- ret = pci_scan_root_bus_bridge(bridge);
- if (ret < 0)
- return ret;
-
- bus = bridge->bus;
-
- pci_assign_unassigned_bus_resources(bus);
- list_for_each_entry(child, &bus->children, node)
- pcie_bus_configure_settings(child);
- pci_bus_add_devices(bus);
- return 0;
+ return pci_host_probe(bridge);
}
static const struct of_device_id xgene_pcie_match_table[] = {