* [PATCH] PCI: rcar: Consolidate register space lookup and ioremap
@ 2016-08-22 19:27 Bjorn Helgaas
2016-08-23 6:49 ` Geert Uytterhoeven
0 siblings, 1 reply; 2+ messages in thread
From: Bjorn Helgaas @ 2016-08-22 19:27 UTC (permalink / raw)
To: Simon Horman; +Cc: linux-renesas-soc, linux-pci, linux-kernel
Move the devm_ioremap_resource() of R-Car register space next to the
of_address_to_resource() that extracts the resource. No functional change
intended.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
---
drivers/pci/host/pcie-rcar.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-rcar.c
index 65db7a2..e58bbbc 100644
--- a/drivers/pci/host/pcie-rcar.c
+++ b/drivers/pci/host/pcie-rcar.c
@@ -775,6 +775,10 @@ static int rcar_pcie_get_resources(struct platform_device *pdev,
if (err)
return err;
+ pcie->base = devm_ioremap_resource(&pdev->dev, &res);
+ if (IS_ERR(pcie->base))
+ return PTR_ERR(pcie->base);
+
pcie->clk = devm_clk_get(&pdev->dev, "pcie");
if (IS_ERR(pcie->clk)) {
dev_err(pcie->dev, "cannot get platform clock\n");
@@ -810,12 +814,6 @@ static int rcar_pcie_get_resources(struct platform_device *pdev,
}
pcie->msi.irq2 = i;
- pcie->base = devm_ioremap_resource(&pdev->dev, &res);
- if (IS_ERR(pcie->base)) {
- err = PTR_ERR(pcie->base);
- goto err_map_reg;
- }
-
return 0;
err_map_reg:
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] PCI: rcar: Consolidate register space lookup and ioremap
2016-08-22 19:27 [PATCH] PCI: rcar: Consolidate register space lookup and ioremap Bjorn Helgaas
@ 2016-08-23 6:49 ` Geert Uytterhoeven
0 siblings, 0 replies; 2+ messages in thread
From: Geert Uytterhoeven @ 2016-08-23 6:49 UTC (permalink / raw)
To: Bjorn Helgaas; +Cc: Simon Horman, Linux-Renesas, linux-pci, linux-kernel
On Mon, Aug 22, 2016 at 9:27 PM, Bjorn Helgaas <bhelgaas@google.com> wrote:
> Move the devm_ioremap_resource() of R-Car register space next to the
> of_address_to_resource() that extracts the resource. No functional change
> intended.
>
> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-08-23 6:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-22 19:27 [PATCH] PCI: rcar: Consolidate register space lookup and ioremap Bjorn Helgaas
2016-08-23 6:49 ` Geert Uytterhoeven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).