diff options
author | zhang songyi <zhang.songyi@zte.com.cn> | 2022-12-02 10:28:15 +0800 |
---|---|---|
committer | Thomas Bogendoerfer <tsbogend@alpha.franken.de> | 2022-12-02 16:48:52 +0100 |
commit | b43340ddaea3abafe5d4cdc50b03342fa6ba9a73 (patch) | |
tree | bf7a54f9d554fcddcd0f0c4eb375d65ddbddb912 /arch/mips/pci | |
parent | 7c18b64bba3bcad1be94b404f47b94a04b91ce79 (diff) | |
download | linux-b43340ddaea3abafe5d4cdc50b03342fa6ba9a73.tar.bz2 |
mips/pci: use devm_platform_ioremap_resource()
Use the devm_platform_ioremap_resource() helper instead of
calling platform_get_resource() and devm_ioremap_resource()
separately
Signed-off-by: zhang songyi <zhang.songyi@zte.com.cn>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Diffstat (limited to 'arch/mips/pci')
-rw-r--r-- | arch/mips/pci/pci-rt3883.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/mips/pci/pci-rt3883.c b/arch/mips/pci/pci-rt3883.c index e07ae098bdd8..d59888aaed81 100644 --- a/arch/mips/pci/pci-rt3883.c +++ b/arch/mips/pci/pci-rt3883.c @@ -404,7 +404,6 @@ static int rt3883_pci_probe(struct platform_device *pdev) struct rt3883_pci_controller *rpc; struct device *dev = &pdev->dev; struct device_node *np = dev->of_node; - struct resource *res; struct device_node *child; u32 val; int err; @@ -414,8 +413,7 @@ static int rt3883_pci_probe(struct platform_device *pdev) if (!rpc) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - rpc->base = devm_ioremap_resource(dev, res); + rpc->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(rpc->base)) return PTR_ERR(rpc->base); |