summaryrefslogtreecommitdiffstats
path: root/drivers/pci/dwc
diff options
context:
space:
mode:
authorGustavo Pimentel2018-05-14 19:32:34 +0200
committerLorenzo Pieralisi2018-05-15 17:24:14 +0200
commit71dcce64593ff8d8266c9581cf2bfa5c5a5c8cf4 (patch)
treee36cccda54f6fc1c5a0c8306e688ac9798100598 /drivers/pci/dwc
parentmisc: pci_endpoint_test: Add DesignWare EP entry (diff)
downloadkernel-qcow2-linux-71dcce64593ff8d8266c9581cf2bfa5c5a5c8cf4.tar.gz
kernel-qcow2-linux-71dcce64593ff8d8266c9581cf2bfa5c5a5c8cf4.tar.xz
kernel-qcow2-linux-71dcce64593ff8d8266c9581cf2bfa5c5a5c8cf4.zip
PCI: dwc: artpec6: Use devm_ioremap_resource() instead of devm_ioremap()
Replace the use of devm_ioremap() with devm_ioremap_resource() as reported and discussed in the mailing list thread link. Link: https://lkml.kernel.org/r/20180120001645.GA21343@lenoch Signed-off-by: Gustavo Pimentel <gustavo.pimentel@synopsys.com> [lorenzo.pieralisi@arm.com: updated commit log] Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
Diffstat (limited to 'drivers/pci/dwc')
-rw-r--r--drivers/pci/dwc/pcie-artpec6.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/pci/dwc/pcie-artpec6.c b/drivers/pci/dwc/pcie-artpec6.c
index e66cede2b5b7..321b56cfd5d0 100644
--- a/drivers/pci/dwc/pcie-artpec6.c
+++ b/drivers/pci/dwc/pcie-artpec6.c
@@ -463,9 +463,9 @@ static int artpec6_add_pcie_ep(struct artpec6_pcie *artpec6_pcie,
ep->ops = &pcie_ep_ops;
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dbi2");
- pci->dbi_base2 = devm_ioremap(dev, res->start, resource_size(res));
- if (!pci->dbi_base2)
- return -ENOMEM;
+ pci->dbi_base2 = devm_ioremap_resource(dev, res);
+ if (IS_ERR(pci->dbi_base2))
+ return PTR_ERR(pci->dbi_base2);
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "addr_space");
if (!res)