All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mfd: ipaq-micro: Use devm_platform_ioremap_resource() in micro_probe()
@ 2019-09-18 11:48 ` Markus Elfring
  0 siblings, 0 replies; 4+ messages in thread
From: Markus Elfring @ 2019-09-18 11:48 UTC (permalink / raw)
  To: kernel-janitors, Lee Jones, Linus Walleij
  Cc: LKML, Bartosz Golaszewski, Himanshu Jha

From: Markus Elfring <elfring@users.sourceforge.net>
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.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/mfd/ipaq-micro.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/mfd/ipaq-micro.c b/drivers/mfd/ipaq-micro.c
index a1d9be82734d..e92eeeb67a98 100644
--- a/drivers/mfd/ipaq-micro.c
+++ b/drivers/mfd/ipaq-micro.c
@@ -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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] mfd: ipaq-micro: Use devm_platform_ioremap_resource() in micro_probe()
@ 2019-09-18 11:48 ` Markus Elfring
  0 siblings, 0 replies; 4+ messages in thread
From: Markus Elfring @ 2019-09-18 11:48 UTC (permalink / raw)
  To: kernel-janitors, Lee Jones, Linus Walleij
  Cc: LKML, Bartosz Golaszewski, Himanshu Jha

From: Markus Elfring <elfring@users.sourceforge.net>
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.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/mfd/ipaq-micro.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/mfd/ipaq-micro.c b/drivers/mfd/ipaq-micro.c
index a1d9be82734d..e92eeeb67a98 100644
--- a/drivers/mfd/ipaq-micro.c
+++ b/drivers/mfd/ipaq-micro.c
@@ -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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] mfd: ipaq-micro: Use devm_platform_ioremap_resource() in micro_probe()
  2019-09-18 11:48 ` Markus Elfring
@ 2019-10-04 12:07   ` Lee Jones
  -1 siblings, 0 replies; 4+ messages in thread
From: Lee Jones @ 2019-10-04 12:07 UTC (permalink / raw)
  To: Markus Elfring
  Cc: kernel-janitors, Linus Walleij, LKML, Bartosz Golaszewski, Himanshu Jha

On Wed, 18 Sep 2019, Markus Elfring wrote:

> From: Markus Elfring <elfring@users.sourceforge.net>
> 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.
> 
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
>  drivers/mfd/ipaq-micro.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)

Applied, thanks.

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mfd: ipaq-micro: Use devm_platform_ioremap_resource() in micro_probe()
@ 2019-10-04 12:07   ` Lee Jones
  0 siblings, 0 replies; 4+ messages in thread
From: Lee Jones @ 2019-10-04 12:07 UTC (permalink / raw)
  To: Markus Elfring
  Cc: kernel-janitors, Linus Walleij, LKML, Bartosz Golaszewski, Himanshu Jha

On Wed, 18 Sep 2019, Markus Elfring wrote:

> From: Markus Elfring <elfring@users.sourceforge.net>
> 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.
> 
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
>  drivers/mfd/ipaq-micro.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)

Applied, thanks.

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-10-04 12:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-18 11:48 [PATCH] mfd: ipaq-micro: Use devm_platform_ioremap_resource() in micro_probe() Markus Elfring
2019-09-18 11:48 ` Markus Elfring
2019-10-04 12:07 ` Lee Jones
2019-10-04 12:07   ` Lee Jones

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.