diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2019-06-24 14:17:07 +1000 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2019-06-29 10:41:50 +1000 |
commit | f2c7660f504269b858717413b5bb8d00a6bd42d1 (patch) | |
tree | 64517b7d31f8ead2ed28ec4c7aad87b9b9782f2c | |
parent | d2db11e3c4ebf9a3ce9401c5f032bb3a66af2380 (diff) | |
download | pci-f2c7660f504269b858717413b5bb8d00a6bd42d1.tar.gz |
PCI: controller: altera: Use pci_host_resource_survey()
Use this instead of pci_assign_unassigned_bus_resources() as it is
more appropriate for a host bridge.
The result should be equivalent based on the default ARM policy.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r-- | drivers/pci/controller/pcie-altera.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/pci/controller/pcie-altera.c b/drivers/pci/controller/pcie-altera.c index 27edcebd1726c..d2535511da85c 100644 --- a/drivers/pci/controller/pcie-altera.c +++ b/drivers/pci/controller/pcie-altera.c @@ -786,8 +786,6 @@ static int altera_pcie_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct altera_pcie *pcie; - struct pci_bus *bus; - struct pci_bus *child; struct pci_host_bridge *bridge; int ret; const struct of_device_id *match; @@ -843,15 +841,8 @@ static int altera_pcie_probe(struct platform_device *pdev) if (ret < 0) return ret; - bus = bridge->bus; - - pci_assign_unassigned_bus_resources(bus); - - /* Configure PCI Express setting. */ - list_for_each_entry(child, &bus->children, node) - pcie_bus_configure_settings(child); - - pci_bus_add_devices(bus); + pci_host_resource_survey(bridge->bus); + pci_bus_add_devices(bridge->bus); return ret; } |