aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/controller/pcie-altera-msi.c
diff options
context:
space:
mode:
authorDejin Zheng <[email protected]>2020-06-02 17:16:01 +0000
committerLorenzo Pieralisi <[email protected]>2020-07-10 10:50:23 +0000
commite2dcd20b1645a7285b304bf6b9a1a6637f0f254a (patch)
tree273af0b839d7c4f41390d28433ea0cd9cfdf344c /drivers/pci/controller/pcie-altera-msi.c
parentPCI: xilinx: Use pci_host_probe() to register host (diff)
downloadkernel-e2dcd20b1645a7285b304bf6b9a1a6637f0f254a.tar.gz
kernel-e2dcd20b1645a7285b304bf6b9a1a6637f0f254a.zip
PCI: controller: Convert to devm_platform_ioremap_resource_byname()
Use devm_platform_ioremap_resource_byname() to simplify the code, since it calls respectively platform_get_resource_byname() and devm_ioremap_resource(). Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dejin Zheng <[email protected]> Signed-off-by: Lorenzo Pieralisi <[email protected]> Reviewed-by: Rob Herring <[email protected]> Reviewed-by: Gustavo Pimentel <[email protected]>
Diffstat (limited to 'drivers/pci/controller/pcie-altera-msi.c')
-rw-r--r--drivers/pci/controller/pcie-altera-msi.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/pci/controller/pcie-altera-msi.c b/drivers/pci/controller/pcie-altera-msi.c
index 16d938920ca5..613e19af71bd 100644
--- a/drivers/pci/controller/pcie-altera-msi.c
+++ b/drivers/pci/controller/pcie-altera-msi.c
@@ -228,8 +228,7 @@ static int altera_msi_probe(struct platform_device *pdev)
mutex_init(&msi->lock);
msi->pdev = pdev;
- res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "csr");
- msi->csr_base = devm_ioremap_resource(&pdev->dev, res);
+ msi->csr_base = devm_platform_ioremap_resource_byname(pdev, "csr");
if (IS_ERR(msi->csr_base)) {
dev_err(&pdev->dev, "failed to map csr memory\n");
return PTR_ERR(msi->csr_base);