mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] mips: rb532: use devm_platform_ioremap_resource in gpio probe
@ 2026-08-11 18:35 Rosen Penev
  2026-08-13 10:42 ` Markus Elfring
  0 siblings, 1 reply; 2+ messages in thread
From: Rosen Penev @ 2026-08-11 18:35 UTC (permalink / raw)
  To: linux-mips; +Cc: Thomas Bogendoerfer, open list

Replace the platform_get_resource()/devm_ioremap_resource() pair with
the devm_platform_ioremap_resource() helper and drop the now-unused
struct resource pointer and NULL check.

Assisted-by: opencode:deepseek-v4-flash-free
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 arch/mips/rb532/gpio.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/arch/mips/rb532/gpio.c b/arch/mips/rb532/gpio.c
index 49e1a15a3827..458895a9fb25 100644
--- a/arch/mips/rb532/gpio.c
+++ b/arch/mips/rb532/gpio.c
@@ -192,13 +192,8 @@ EXPORT_SYMBOL(rb532_gpio_set_func);
 static int rb532_gpio_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
-	struct resource *res;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res)
-		return -EINVAL;
-
-	rb532_gpio_chip->regbase = devm_ioremap_resource(dev, res);
+	rb532_gpio_chip->regbase = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(rb532_gpio_chip->regbase))
 		return PTR_ERR(rb532_gpio_chip->regbase);
 
-- 
2.55.0


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

* Re: [PATCH] mips: rb532: use devm_platform_ioremap_resource in gpio probe
  2026-08-11 18:35 [PATCH] mips: rb532: use devm_platform_ioremap_resource in gpio probe Rosen Penev
@ 2026-08-13 10:42 ` Markus Elfring
  0 siblings, 0 replies; 2+ messages in thread
From: Markus Elfring @ 2026-08-13 10:42 UTC (permalink / raw)
  To: Rosen Penev, linux-mips, Thomas Bogendörfer; +Cc: LKML, kernel-janitors

> Replace the platform_get_resource()/devm_ioremap_resource() pair with
> the devm_platform_ioremap_resource() helper and drop the now-unused
> struct resource pointer and NULL check.
> 
> Assisted-by: opencode:deepseek-v4-flash-free

Would it be helpful to mention that a wrapper function is available since
the commit 7945f929f1a77a1c8887a97ca07f87626858ff42 ("drivers:
provide devm_platform_ioremap_resource()")?

Regards,
Markus

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

end of thread, other threads:[~2026-08-13 10:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-11 18:35 [PATCH] mips: rb532: use devm_platform_ioremap_resource in gpio probe Rosen Penev
2026-08-13 10:42 ` Markus Elfring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®