Re: [PATCH v4 4/8] PCI: Replace dev_node parameter of of_pci_get_host_bridge_resources with device
On Mon, May 28, 2018 at 12:46:35PM +0200, Jan Kiszka wrote: > On 2018-05-28 12:00, Vladimir Zapolskiy wrote: > > Hi Jan, Bjorn, > > > > On 05/15/2018 12:07 PM, Jan Kiszka wrote: > >> From: Jan Kiszka > >> > >> Another step towards a managed version of > >> of_pci_get_host_bridge_resources(): Feed in the underlying device, > >> rather than just the OF node. This will allow to use managed resource > >> allocation internally later on. > >> > >> CC: Jingoo Han > >> CC: Joao Pinto > >> CC: Lorenzo Pieralisi > >> Signed-off-by: Jan Kiszka > > > > [snip] > > > >> diff --git a/drivers/pci/host/pcie-altera.c > >> b/drivers/pci/host/pcie-altera.c > >> index a6af62e0256d..61802e55a00c 100644 > >> --- a/drivers/pci/host/pcie-altera.c > >> +++ b/drivers/pci/host/pcie-altera.c > >> @@ -488,11 +488,10 @@ static int > >> altera_pcie_parse_request_of_pci_ranges(struct altera_pcie *pcie) > >> { > >>int err, res_valid = 0; > >>struct device *dev = >pdev->dev; > >> - struct device_node *np = dev->of_node; > >>struct resource_entry *win; > >> > >> - err = of_pci_get_host_bridge_resources(np, 0, 0xff, >resources, > >> - NULL); > >> + err = of_pci_get_host_bridge_resources(dev, 0, 0xff > >> + >resources, NULL); > >>if (err) > >>return err; > >> > > > > In case if it is an undiscovered issue, a comma was mistakenly removed, > > which will result it compilation error. > > > > The problem is also found in pci/next , see commit 88e3909aa125. > > Yes, that's known. We have a bisection breakage: The issue was fixed > again by patch 6 in that series. I updated 88e3909aa125 to fix the bisection issue. I'll rebuild pci/next later today or tomorrow.
Re: [PATCH v4 4/8] PCI: Replace dev_node parameter of of_pci_get_host_bridge_resources with device
On Mon, May 28, 2018 at 12:46:35PM +0200, Jan Kiszka wrote: > On 2018-05-28 12:00, Vladimir Zapolskiy wrote: > > Hi Jan, Bjorn, > > > > On 05/15/2018 12:07 PM, Jan Kiszka wrote: > >> From: Jan Kiszka > >> > >> Another step towards a managed version of > >> of_pci_get_host_bridge_resources(): Feed in the underlying device, > >> rather than just the OF node. This will allow to use managed resource > >> allocation internally later on. > >> > >> CC: Jingoo Han > >> CC: Joao Pinto > >> CC: Lorenzo Pieralisi > >> Signed-off-by: Jan Kiszka > > > > [snip] > > > >> diff --git a/drivers/pci/host/pcie-altera.c > >> b/drivers/pci/host/pcie-altera.c > >> index a6af62e0256d..61802e55a00c 100644 > >> --- a/drivers/pci/host/pcie-altera.c > >> +++ b/drivers/pci/host/pcie-altera.c > >> @@ -488,11 +488,10 @@ static int > >> altera_pcie_parse_request_of_pci_ranges(struct altera_pcie *pcie) > >> { > >>int err, res_valid = 0; > >>struct device *dev = >pdev->dev; > >> - struct device_node *np = dev->of_node; > >>struct resource_entry *win; > >> > >> - err = of_pci_get_host_bridge_resources(np, 0, 0xff, >resources, > >> - NULL); > >> + err = of_pci_get_host_bridge_resources(dev, 0, 0xff > >> + >resources, NULL); > >>if (err) > >>return err; > >> > > > > In case if it is an undiscovered issue, a comma was mistakenly removed, > > which will result it compilation error. > > > > The problem is also found in pci/next , see commit 88e3909aa125. > > Yes, that's known. We have a bisection breakage: The issue was fixed > again by patch 6 in that series. I updated 88e3909aa125 to fix the bisection issue. I'll rebuild pci/next later today or tomorrow.
Re: [PATCH v4 4/8] PCI: Replace dev_node parameter of of_pci_get_host_bridge_resources with device
On 2018-05-28 12:00, Vladimir Zapolskiy wrote: > Hi Jan, Bjorn, > > On 05/15/2018 12:07 PM, Jan Kiszka wrote: >> From: Jan Kiszka>> >> Another step towards a managed version of >> of_pci_get_host_bridge_resources(): Feed in the underlying device, >> rather than just the OF node. This will allow to use managed resource >> allocation internally later on. >> >> CC: Jingoo Han >> CC: Joao Pinto >> CC: Lorenzo Pieralisi >> Signed-off-by: Jan Kiszka > > [snip] > >> diff --git a/drivers/pci/host/pcie-altera.c b/drivers/pci/host/pcie-altera.c >> index a6af62e0256d..61802e55a00c 100644 >> --- a/drivers/pci/host/pcie-altera.c >> +++ b/drivers/pci/host/pcie-altera.c >> @@ -488,11 +488,10 @@ static int >> altera_pcie_parse_request_of_pci_ranges(struct altera_pcie *pcie) >> { >> int err, res_valid = 0; >> struct device *dev = >pdev->dev; >> -struct device_node *np = dev->of_node; >> struct resource_entry *win; >> >> -err = of_pci_get_host_bridge_resources(np, 0, 0xff, >resources, >> - NULL); >> +err = of_pci_get_host_bridge_resources(dev, 0, 0xff >> +>resources, NULL); >> if (err) >> return err; >> > > In case if it is an undiscovered issue, a comma was mistakenly removed, > which will result it compilation error. > > The problem is also found in pci/next , see commit 88e3909aa125. Yes, that's known. We have a bisection breakage: The issue was fixed again by patch 6 in that series. Jan -- Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux
Re: [PATCH v4 4/8] PCI: Replace dev_node parameter of of_pci_get_host_bridge_resources with device
On 2018-05-28 12:00, Vladimir Zapolskiy wrote: > Hi Jan, Bjorn, > > On 05/15/2018 12:07 PM, Jan Kiszka wrote: >> From: Jan Kiszka >> >> Another step towards a managed version of >> of_pci_get_host_bridge_resources(): Feed in the underlying device, >> rather than just the OF node. This will allow to use managed resource >> allocation internally later on. >> >> CC: Jingoo Han >> CC: Joao Pinto >> CC: Lorenzo Pieralisi >> Signed-off-by: Jan Kiszka > > [snip] > >> diff --git a/drivers/pci/host/pcie-altera.c b/drivers/pci/host/pcie-altera.c >> index a6af62e0256d..61802e55a00c 100644 >> --- a/drivers/pci/host/pcie-altera.c >> +++ b/drivers/pci/host/pcie-altera.c >> @@ -488,11 +488,10 @@ static int >> altera_pcie_parse_request_of_pci_ranges(struct altera_pcie *pcie) >> { >> int err, res_valid = 0; >> struct device *dev = >pdev->dev; >> -struct device_node *np = dev->of_node; >> struct resource_entry *win; >> >> -err = of_pci_get_host_bridge_resources(np, 0, 0xff, >resources, >> - NULL); >> +err = of_pci_get_host_bridge_resources(dev, 0, 0xff >> +>resources, NULL); >> if (err) >> return err; >> > > In case if it is an undiscovered issue, a comma was mistakenly removed, > which will result it compilation error. > > The problem is also found in pci/next , see commit 88e3909aa125. Yes, that's known. We have a bisection breakage: The issue was fixed again by patch 6 in that series. Jan -- Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux
Re: [PATCH v4 4/8] PCI: Replace dev_node parameter of of_pci_get_host_bridge_resources with device
Hi Jan, Bjorn, On 05/15/2018 12:07 PM, Jan Kiszka wrote: > From: Jan Kiszka> > Another step towards a managed version of > of_pci_get_host_bridge_resources(): Feed in the underlying device, > rather than just the OF node. This will allow to use managed resource > allocation internally later on. > > CC: Jingoo Han > CC: Joao Pinto > CC: Lorenzo Pieralisi > Signed-off-by: Jan Kiszka [snip] > diff --git a/drivers/pci/host/pcie-altera.c b/drivers/pci/host/pcie-altera.c > index a6af62e0256d..61802e55a00c 100644 > --- a/drivers/pci/host/pcie-altera.c > +++ b/drivers/pci/host/pcie-altera.c > @@ -488,11 +488,10 @@ static int > altera_pcie_parse_request_of_pci_ranges(struct altera_pcie *pcie) > { > int err, res_valid = 0; > struct device *dev = >pdev->dev; > - struct device_node *np = dev->of_node; > struct resource_entry *win; > > - err = of_pci_get_host_bridge_resources(np, 0, 0xff, >resources, > -NULL); > + err = of_pci_get_host_bridge_resources(dev, 0, 0xff > + >resources, NULL); > if (err) > return err; > In case if it is an undiscovered issue, a comma was mistakenly removed, which will result it compilation error. The problem is also found in pci/next , see commit 88e3909aa125. -- With best wishes, Vladimir
Re: [PATCH v4 4/8] PCI: Replace dev_node parameter of of_pci_get_host_bridge_resources with device
Hi Jan, Bjorn, On 05/15/2018 12:07 PM, Jan Kiszka wrote: > From: Jan Kiszka > > Another step towards a managed version of > of_pci_get_host_bridge_resources(): Feed in the underlying device, > rather than just the OF node. This will allow to use managed resource > allocation internally later on. > > CC: Jingoo Han > CC: Joao Pinto > CC: Lorenzo Pieralisi > Signed-off-by: Jan Kiszka [snip] > diff --git a/drivers/pci/host/pcie-altera.c b/drivers/pci/host/pcie-altera.c > index a6af62e0256d..61802e55a00c 100644 > --- a/drivers/pci/host/pcie-altera.c > +++ b/drivers/pci/host/pcie-altera.c > @@ -488,11 +488,10 @@ static int > altera_pcie_parse_request_of_pci_ranges(struct altera_pcie *pcie) > { > int err, res_valid = 0; > struct device *dev = >pdev->dev; > - struct device_node *np = dev->of_node; > struct resource_entry *win; > > - err = of_pci_get_host_bridge_resources(np, 0, 0xff, >resources, > -NULL); > + err = of_pci_get_host_bridge_resources(dev, 0, 0xff > + >resources, NULL); > if (err) > return err; > In case if it is an undiscovered issue, a comma was mistakenly removed, which will result it compilation error. The problem is also found in pci/next , see commit 88e3909aa125. -- With best wishes, Vladimir
Re: [PATCH v4 4/8] PCI: Replace dev_node parameter of of_pci_get_host_bridge_resources with device
On Tuesday, May 15, 2018 5:07 AM, Jan Kiszka wrote: > > From: Jan Kiszka> > Another step towards a managed version of > of_pci_get_host_bridge_resources(): Feed in the underlying device, > rather than just the OF node. This will allow to use managed resource > allocation internally later on. > > CC: Jingoo Han > CC: Joao Pinto > CC: Lorenzo Pieralisi > Signed-off-by: Jan Kiszka Acked-by: Jingoo Han Best regards, Jingoo Han > --- > drivers/pci/dwc/pcie-designware-host.c | 2 +- > drivers/pci/host/pci-aardvark.c| 5 ++--- > drivers/pci/host/pci-ftpci100.c| 4 ++-- > drivers/pci/host/pci-v3-semi.c | 3 ++- > drivers/pci/host/pci-versatile.c | 3 +-- > drivers/pci/host/pci-xgene.c | 3 ++- > drivers/pci/host/pcie-altera.c | 5 ++--- > drivers/pci/host/pcie-iproc-platform.c | 4 ++-- > drivers/pci/host/pcie-rcar.c | 5 ++--- > drivers/pci/host/pcie-rockchip.c | 4 ++-- > drivers/pci/host/pcie-xilinx-nwl.c | 4 ++-- > drivers/pci/host/pcie-xilinx.c | 4 ++-- > drivers/pci/of.c | 9 + > include/linux/of_pci.h | 4 ++-- > 14 files changed, 29 insertions(+), 30 deletions(-) >
Re: [PATCH v4 4/8] PCI: Replace dev_node parameter of of_pci_get_host_bridge_resources with device
On Tuesday, May 15, 2018 5:07 AM, Jan Kiszka wrote: > > From: Jan Kiszka > > Another step towards a managed version of > of_pci_get_host_bridge_resources(): Feed in the underlying device, > rather than just the OF node. This will allow to use managed resource > allocation internally later on. > > CC: Jingoo Han > CC: Joao Pinto > CC: Lorenzo Pieralisi > Signed-off-by: Jan Kiszka Acked-by: Jingoo Han Best regards, Jingoo Han > --- > drivers/pci/dwc/pcie-designware-host.c | 2 +- > drivers/pci/host/pci-aardvark.c| 5 ++--- > drivers/pci/host/pci-ftpci100.c| 4 ++-- > drivers/pci/host/pci-v3-semi.c | 3 ++- > drivers/pci/host/pci-versatile.c | 3 +-- > drivers/pci/host/pci-xgene.c | 3 ++- > drivers/pci/host/pcie-altera.c | 5 ++--- > drivers/pci/host/pcie-iproc-platform.c | 4 ++-- > drivers/pci/host/pcie-rcar.c | 5 ++--- > drivers/pci/host/pcie-rockchip.c | 4 ++-- > drivers/pci/host/pcie-xilinx-nwl.c | 4 ++-- > drivers/pci/host/pcie-xilinx.c | 4 ++-- > drivers/pci/of.c | 9 + > include/linux/of_pci.h | 4 ++-- > 14 files changed, 29 insertions(+), 30 deletions(-) >
Re: [PATCH v4 4/8] PCI: Replace dev_node parameter of of_pci_get_host_bridge_resources with device
On 05/15/2018 12:07 PM, Jan Kiszka wrote: > From: Jan Kiszka> > Another step towards a managed version of > of_pci_get_host_bridge_resources(): Feed in the underlying device, > rather than just the OF node. This will allow to use managed resource > allocation internally later on. > > CC: Jingoo Han > CC: Joao Pinto > CC: Lorenzo Pieralisi > Signed-off-by: Jan Kiszka Tested-by: Vladimir Zapolskiy Reviewed-by: Vladimir Zapolskiy -- With best wishes, Vladimir
Re: [PATCH v4 4/8] PCI: Replace dev_node parameter of of_pci_get_host_bridge_resources with device
On 05/15/2018 12:07 PM, Jan Kiszka wrote: > From: Jan Kiszka > > Another step towards a managed version of > of_pci_get_host_bridge_resources(): Feed in the underlying device, > rather than just the OF node. This will allow to use managed resource > allocation internally later on. > > CC: Jingoo Han > CC: Joao Pinto > CC: Lorenzo Pieralisi > Signed-off-by: Jan Kiszka Tested-by: Vladimir Zapolskiy Reviewed-by: Vladimir Zapolskiy -- With best wishes, Vladimir
[PATCH v4 4/8] PCI: Replace dev_node parameter of of_pci_get_host_bridge_resources with device
From: Jan KiszkaAnother step towards a managed version of of_pci_get_host_bridge_resources(): Feed in the underlying device, rather than just the OF node. This will allow to use managed resource allocation internally later on. CC: Jingoo Han CC: Joao Pinto CC: Lorenzo Pieralisi Signed-off-by: Jan Kiszka --- drivers/pci/dwc/pcie-designware-host.c | 2 +- drivers/pci/host/pci-aardvark.c| 5 ++--- drivers/pci/host/pci-ftpci100.c| 4 ++-- drivers/pci/host/pci-v3-semi.c | 3 ++- drivers/pci/host/pci-versatile.c | 3 +-- drivers/pci/host/pci-xgene.c | 3 ++- drivers/pci/host/pcie-altera.c | 5 ++--- drivers/pci/host/pcie-iproc-platform.c | 4 ++-- drivers/pci/host/pcie-rcar.c | 5 ++--- drivers/pci/host/pcie-rockchip.c | 4 ++-- drivers/pci/host/pcie-xilinx-nwl.c | 4 ++-- drivers/pci/host/pcie-xilinx.c | 4 ++-- drivers/pci/of.c | 9 + include/linux/of_pci.h | 4 ++-- 14 files changed, 29 insertions(+), 30 deletions(-) diff --git a/drivers/pci/dwc/pcie-designware-host.c b/drivers/pci/dwc/pcie-designware-host.c index 6c409079d514..5a535690b7b5 100644 --- a/drivers/pci/dwc/pcie-designware-host.c +++ b/drivers/pci/dwc/pcie-designware-host.c @@ -342,7 +342,7 @@ int dw_pcie_host_init(struct pcie_port *pp) if (!bridge) return -ENOMEM; - ret = of_pci_get_host_bridge_resources(np, 0, 0xff, + ret = of_pci_get_host_bridge_resources(dev, 0, 0xff, >windows, >io_base); if (ret) return ret; diff --git a/drivers/pci/host/pci-aardvark.c b/drivers/pci/host/pci-aardvark.c index 9abf549631b4..39d8fc2a8a76 100644 --- a/drivers/pci/host/pci-aardvark.c +++ b/drivers/pci/host/pci-aardvark.c @@ -822,14 +822,13 @@ static int advk_pcie_parse_request_of_pci_ranges(struct advk_pcie *pcie) { int err, res_valid = 0; struct device *dev = >pdev->dev; - struct device_node *np = dev->of_node; struct resource_entry *win, *tmp; resource_size_t iobase; INIT_LIST_HEAD(>resources); - err = of_pci_get_host_bridge_resources(np, 0, 0xff, >resources, - ); + err = of_pci_get_host_bridge_resources(dev, 0, 0xff, + >resources, ); if (err) return err; diff --git a/drivers/pci/host/pci-ftpci100.c b/drivers/pci/host/pci-ftpci100.c index 5008fd87956a..5c176f806fe5 100644 --- a/drivers/pci/host/pci-ftpci100.c +++ b/drivers/pci/host/pci-ftpci100.c @@ -476,8 +476,8 @@ static int faraday_pci_probe(struct platform_device *pdev) if (IS_ERR(p->base)) return PTR_ERR(p->base); - ret = of_pci_get_host_bridge_resources(dev->of_node, 0, 0xff, - , _base); + ret = of_pci_get_host_bridge_resources(dev, 0, 0xff, + , _base); if (ret) return ret; diff --git a/drivers/pci/host/pci-v3-semi.c b/drivers/pci/host/pci-v3-semi.c index 0a4dea796663..f3f39935ac2f 100644 --- a/drivers/pci/host/pci-v3-semi.c +++ b/drivers/pci/host/pci-v3-semi.c @@ -791,7 +791,8 @@ static int v3_pci_probe(struct platform_device *pdev) if (IS_ERR(v3->config_base)) return PTR_ERR(v3->config_base); - ret = of_pci_get_host_bridge_resources(np, 0, 0xff, , _base); + ret = of_pci_get_host_bridge_resources(dev, 0, 0xff, , + _base); if (ret) return ret; diff --git a/drivers/pci/host/pci-versatile.c b/drivers/pci/host/pci-versatile.c index 5b3876f5312b..ef33ec0a9e1b 100644 --- a/drivers/pci/host/pci-versatile.c +++ b/drivers/pci/host/pci-versatile.c @@ -64,11 +64,10 @@ static int versatile_pci_parse_request_of_pci_ranges(struct device *dev, struct list_head *res) { int err, mem = 1, res_valid = 0; - struct device_node *np = dev->of_node; resource_size_t iobase; struct resource_entry *win, *tmp; - err = of_pci_get_host_bridge_resources(np, 0, 0xff, res, ); + err = of_pci_get_host_bridge_resources(dev, 0, 0xff, res, ); if (err) return err; diff --git a/drivers/pci/host/pci-xgene.c b/drivers/pci/host/pci-xgene.c index 0a0d7ee6d3c9..88e9a6d315b3 100644 --- a/drivers/pci/host/pci-xgene.c +++ b/drivers/pci/host/pci-xgene.c @@ -632,7 +632,8 @@ static int xgene_pcie_probe(struct platform_device *pdev) if (ret) return ret; - ret = of_pci_get_host_bridge_resources(dn, 0, 0xff, , ); + ret = of_pci_get_host_bridge_resources(dev, 0, 0xff, , +
[PATCH v4 4/8] PCI: Replace dev_node parameter of of_pci_get_host_bridge_resources with device
From: Jan Kiszka Another step towards a managed version of of_pci_get_host_bridge_resources(): Feed in the underlying device, rather than just the OF node. This will allow to use managed resource allocation internally later on. CC: Jingoo Han CC: Joao Pinto CC: Lorenzo Pieralisi Signed-off-by: Jan Kiszka --- drivers/pci/dwc/pcie-designware-host.c | 2 +- drivers/pci/host/pci-aardvark.c| 5 ++--- drivers/pci/host/pci-ftpci100.c| 4 ++-- drivers/pci/host/pci-v3-semi.c | 3 ++- drivers/pci/host/pci-versatile.c | 3 +-- drivers/pci/host/pci-xgene.c | 3 ++- drivers/pci/host/pcie-altera.c | 5 ++--- drivers/pci/host/pcie-iproc-platform.c | 4 ++-- drivers/pci/host/pcie-rcar.c | 5 ++--- drivers/pci/host/pcie-rockchip.c | 4 ++-- drivers/pci/host/pcie-xilinx-nwl.c | 4 ++-- drivers/pci/host/pcie-xilinx.c | 4 ++-- drivers/pci/of.c | 9 + include/linux/of_pci.h | 4 ++-- 14 files changed, 29 insertions(+), 30 deletions(-) diff --git a/drivers/pci/dwc/pcie-designware-host.c b/drivers/pci/dwc/pcie-designware-host.c index 6c409079d514..5a535690b7b5 100644 --- a/drivers/pci/dwc/pcie-designware-host.c +++ b/drivers/pci/dwc/pcie-designware-host.c @@ -342,7 +342,7 @@ int dw_pcie_host_init(struct pcie_port *pp) if (!bridge) return -ENOMEM; - ret = of_pci_get_host_bridge_resources(np, 0, 0xff, + ret = of_pci_get_host_bridge_resources(dev, 0, 0xff, >windows, >io_base); if (ret) return ret; diff --git a/drivers/pci/host/pci-aardvark.c b/drivers/pci/host/pci-aardvark.c index 9abf549631b4..39d8fc2a8a76 100644 --- a/drivers/pci/host/pci-aardvark.c +++ b/drivers/pci/host/pci-aardvark.c @@ -822,14 +822,13 @@ static int advk_pcie_parse_request_of_pci_ranges(struct advk_pcie *pcie) { int err, res_valid = 0; struct device *dev = >pdev->dev; - struct device_node *np = dev->of_node; struct resource_entry *win, *tmp; resource_size_t iobase; INIT_LIST_HEAD(>resources); - err = of_pci_get_host_bridge_resources(np, 0, 0xff, >resources, - ); + err = of_pci_get_host_bridge_resources(dev, 0, 0xff, + >resources, ); if (err) return err; diff --git a/drivers/pci/host/pci-ftpci100.c b/drivers/pci/host/pci-ftpci100.c index 5008fd87956a..5c176f806fe5 100644 --- a/drivers/pci/host/pci-ftpci100.c +++ b/drivers/pci/host/pci-ftpci100.c @@ -476,8 +476,8 @@ static int faraday_pci_probe(struct platform_device *pdev) if (IS_ERR(p->base)) return PTR_ERR(p->base); - ret = of_pci_get_host_bridge_resources(dev->of_node, 0, 0xff, - , _base); + ret = of_pci_get_host_bridge_resources(dev, 0, 0xff, + , _base); if (ret) return ret; diff --git a/drivers/pci/host/pci-v3-semi.c b/drivers/pci/host/pci-v3-semi.c index 0a4dea796663..f3f39935ac2f 100644 --- a/drivers/pci/host/pci-v3-semi.c +++ b/drivers/pci/host/pci-v3-semi.c @@ -791,7 +791,8 @@ static int v3_pci_probe(struct platform_device *pdev) if (IS_ERR(v3->config_base)) return PTR_ERR(v3->config_base); - ret = of_pci_get_host_bridge_resources(np, 0, 0xff, , _base); + ret = of_pci_get_host_bridge_resources(dev, 0, 0xff, , + _base); if (ret) return ret; diff --git a/drivers/pci/host/pci-versatile.c b/drivers/pci/host/pci-versatile.c index 5b3876f5312b..ef33ec0a9e1b 100644 --- a/drivers/pci/host/pci-versatile.c +++ b/drivers/pci/host/pci-versatile.c @@ -64,11 +64,10 @@ static int versatile_pci_parse_request_of_pci_ranges(struct device *dev, struct list_head *res) { int err, mem = 1, res_valid = 0; - struct device_node *np = dev->of_node; resource_size_t iobase; struct resource_entry *win, *tmp; - err = of_pci_get_host_bridge_resources(np, 0, 0xff, res, ); + err = of_pci_get_host_bridge_resources(dev, 0, 0xff, res, ); if (err) return err; diff --git a/drivers/pci/host/pci-xgene.c b/drivers/pci/host/pci-xgene.c index 0a0d7ee6d3c9..88e9a6d315b3 100644 --- a/drivers/pci/host/pci-xgene.c +++ b/drivers/pci/host/pci-xgene.c @@ -632,7 +632,8 @@ static int xgene_pcie_probe(struct platform_device *pdev) if (ret) return ret; - ret = of_pci_get_host_bridge_resources(dn, 0, 0xff, , ); + ret = of_pci_get_host_bridge_resources(dev, 0, 0xff, , + ); if (ret) return ret; diff --git a/drivers/pci/host/pcie-altera.c