diff mbox series

[linux-next,v2] mips/pci: use devm_platform_ioremap_resource()

Message ID 202212021028158035876@zte.com.cn (mailing list archive)
State Accepted
Headers show
Series [linux-next,v2] mips/pci: use devm_platform_ioremap_resource() | expand

Commit Message

zhang.songyi@zte.com.cn Dec. 2, 2022, 2:28 a.m. UTC
From: zhang songyi <zhang.songyi@zte.com.cn>

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>
---
 arch/mips/pci/pci-rt3883.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Philippe Mathieu-Daudé Dec. 2, 2022, 10:43 a.m. UTC | #1
On 2/12/22 03:28, zhang.songyi@zte.com.cn wrote:
> From: zhang songyi <zhang.songyi@zte.com.cn>
> 
> 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>
> ---
>   arch/mips/pci/pci-rt3883.c | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Thomas Bogendoerfer Dec. 2, 2022, 3:51 p.m. UTC | #2
On Fri, Dec 02, 2022 at 10:28:15AM +0800, zhang.songyi@zte.com.cn wrote:
> From: zhang songyi <zhang.songyi@zte.com.cn>
> 
> 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>
> ---
>  arch/mips/pci/pci-rt3883.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)

applied to mips-next.

Thomas.
diff mbox series

Patch

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);