From: Quanyang Wang <[email protected]> Because of mainline commit 3b55809cf91f ("PCI: Make devm_of_pci_get_host_bridge_resources() static"), use pci_parse_request_of_pci_ranges instead of devm_of_pci_get_host_bridge_resources().
Signed-off-by: Quanyang Wang <[email protected]> Signed-off-by: Bruce Ashfield <[email protected]> --- drivers/pci/controller/pcie-xdma-pl.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/drivers/pci/controller/pcie-xdma-pl.c b/drivers/pci/controller/pcie-xdma-pl.c index 0ac9376ccfaf..55876c04b871 100644 --- a/drivers/pci/controller/pcie-xdma-pl.c +++ b/drivers/pci/controller/pcie-xdma-pl.c @@ -814,8 +814,6 @@ static int xilinx_pcie_probe(struct platform_device *pdev) struct pci_bus *child; struct pci_host_bridge *bridge; int err; - resource_size_t iobase = 0; - LIST_HEAD(res); bridge = devm_pci_alloc_host_bridge(dev, sizeof(*port)); if (!bridge) @@ -839,18 +837,13 @@ static int xilinx_pcie_probe(struct platform_device *pdev) return err; } - err = devm_of_pci_get_host_bridge_resources(dev, 0, 0xff, &res, - &iobase); + err = pci_parse_request_of_pci_ranges(dev, &bridge->windows, + &bridge->dma_ranges, NULL); if (err) { dev_err(dev, "Getting bridge resources failed\n"); return err; } - err = devm_request_pci_bus_resources(dev, &res); - if (err) - goto error; - - list_splice_init(&res, &bridge->windows); bridge->dev.parent = dev; bridge->sysdata = port; bridge->busnr = port->root_busno; @@ -860,7 +853,7 @@ static int xilinx_pcie_probe(struct platform_device *pdev) err = pci_scan_root_bus_bridge(bridge); if (err) - goto error; + return err; bus = bridge->bus; @@ -869,10 +862,6 @@ static int xilinx_pcie_probe(struct platform_device *pdev) pcie_bus_configure_settings(child); pci_bus_add_devices(bus); return 0; - -error: - pci_free_resource_list(&res); - return err; } static const struct of_device_id xilinx_pcie_of_match[] = { -- 2.17.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#8842): https://lists.yoctoproject.org/g/linux-yocto/message/8842 Mute This Topic: https://lists.yoctoproject.org/mt/75556324/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
