Skip to contentSkip to conversation

mfd: ipaq-micro: Use devm_platform_ioremap_resource() in micro_probe()

PATCH Applied Markus Elfring 2 participants 2 messages Sep 18, 2019 – Oct 4, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mfd: ipaq-micro: Use devm_platform_ioremap_resource() in micro_probe()

From: Markus Elfring <[email protected]>
Date: Wed, 18 Sep 2019 13:40:30 +0200

Simplify this function implementation by using a known wrapper function.

This issue was detected by using the Coccinelle software.

---
 drivers/mfd/ipaq-micro.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/mfd/ipaq-micro.c +1 -5
index a1d9be82734d..e92eeeb67a98 100644
@@ -396,11 +396,7 @@ static int __init micro_probe(struct platform_device *pdev)
 	if (IS_ERR(micro->base))
 		return PTR_ERR(micro->base);
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
-	if (!res)
-		return -EINVAL;
-
-	micro->sdlc = devm_ioremap_resource(&pdev->dev, res);
+	micro->sdlc = devm_platform_ioremap_resource(pdev, 1);
 	if (IS_ERR(micro->sdlc))
 		return PTR_ERR(micro->sdlc);
 

--
2.23.0

Applied
#1 lore raw
Quoted 11 lines · Markus Elfring

From: Markus Elfring <[email protected]>
Date: Wed, 18 Sep 2019 13:40:30 +0200

Simplify this function implementation by using a known wrapper function.

This issue was detected by using the Coccinelle software.

---
 drivers/mfd/ipaq-micro.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

Applied, thanks.

Signature · 4 lines
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog