From: Quanyang Wang <quanyang.w...@windriver.com>

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 <quanyang.w...@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfi...@gmail.com>
---
 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 fd944cb323e1..9db861f20c4c 100644
--- a/drivers/pci/controller/pcie-xdma-pl.c
+++ b/drivers/pci/controller/pcie-xdma-pl.c
@@ -832,8 +832,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)
@@ -857,18 +855,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;
@@ -878,7 +871,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;
 
@@ -887,10 +880,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 (#9078): 
https://lists.yoctoproject.org/g/linux-yocto/message/9078
Mute This Topic: https://lists.yoctoproject.org/mt/77005841/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to