diff options
author | Dejin Zheng | 2020-07-08 23:56:14 +0800 |
---|---|---|
committer | Lorenzo Pieralisi | 2020-07-10 11:50:23 +0100 |
commit | 3cf0eead9fb895dd91fc1fea0114ca0068d1c1a3 (patch) | |
tree | 107aec946adce5e80924a180d1cb3566777d2de8 /drivers/pci/controller/pci-ftpci100.c | |
parent | e2dcd20b1645a7285b304bf6b9a1a6637f0f254a (diff) |
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/20200708155614.308-1-zhengdejin5@gmail.com
Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'drivers/pci/controller/pci-ftpci100.c')
-rw-r--r-- | drivers/pci/controller/pci-ftpci100.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/pci/controller/pci-ftpci100.c b/drivers/pci/controller/pci-ftpci100.c index 1b67564de7af..221dfc9dc81b 100644 --- a/drivers/pci/controller/pci-ftpci100.c +++ b/drivers/pci/controller/pci-ftpci100.c @@ -422,7 +422,6 @@ static int faraday_pci_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; const struct faraday_pci_variant *variant = of_device_get_match_data(dev); - struct resource *regs; struct resource_entry *win; struct faraday_pci *p; struct resource *io; @@ -465,8 +464,7 @@ static int faraday_pci_probe(struct platform_device *pdev) return ret; } - regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); - p->base = devm_ioremap_resource(dev, regs); + p->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(p->base)) return PTR_ERR(p->base); |