From: Rosen Penev <rosenp@gmail.com>
To: linux-mips@vger.kernel.org
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
linux-kernel@vger.kernel.org (open list)
Subject: [PATCH] mips: rb532: use devm_platform_ioremap_resource in gpio probe
Date: Tue, 11 Aug 2026 11:35:15 -0700 [thread overview]
Message-ID: <20260811183515.24596-1-rosenp@gmail.com> (raw)
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
reply other threads:[~2026-08-11 18:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260811183515.24596-1-rosenp@gmail.com \
--to=rosenp@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=tsbogend@alpha.franken.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox