aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/controller/pci-versatile.c
diff options
context:
space:
mode:
authorDejin Zheng <[email protected]>2020-07-08 15:56:14 +0000
committerLorenzo Pieralisi <[email protected]>2020-07-10 10:50:23 +0000
commit3cf0eead9fb895dd91fc1fea0114ca0068d1c1a3 (patch)
tree107aec946adce5e80924a180d1cb3566777d2de8 /drivers/pci/controller/pci-versatile.c
parentPCI: controller: Convert to devm_platform_ioremap_resource_byname() (diff)
downloadkernel-3cf0eead9fb895dd91fc1fea0114ca0068d1c1a3.tar.gz
kernel-3cf0eead9fb895dd91fc1fea0114ca0068d1c1a3.zip
PCI: controller: Convert to devm_platform_ioremap_resource()
Use devm_platform_ioremap_resource() to simplify the code, since t contains platform_get_resource() and devm_ioremap_resource() calls respectively. 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]>
Diffstat (limited to 'drivers/pci/controller/pci-versatile.c')
-rw-r--r--drivers/pci/controller/pci-versatile.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/pci/controller/pci-versatile.c b/drivers/pci/controller/pci-versatile.c
index e90f0cc65c73..a8d361f6c5d9 100644
--- a/drivers/pci/controller/pci-versatile.c
+++ b/drivers/pci/controller/pci-versatile.c
@@ -76,13 +76,11 @@ static int versatile_pci_probe(struct platform_device *pdev)
if (!bridge)
return -ENOMEM;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- versatile_pci_base = devm_ioremap_resource(dev, res);
+ versatile_pci_base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(versatile_pci_base))
return PTR_ERR(versatile_pci_base);
- res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
- versatile_cfg_base[0] = devm_ioremap_resource(dev, res);
+ versatile_cfg_base[0] = devm_platform_ioremap_resource(pdev, 1);
if (IS_ERR(versatile_cfg_base[0]))
return PTR_ERR(versatile_cfg_base[0]);