All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yang Yingliang <yangyingliang@huawei.com>
To: <linux-gpio@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Cc: <linus.walleij@linaro.org>, <p.zabel@pengutronix.de>,
	<horatiu.vultur@microchip.com>
Subject: [PATCH -next 2/2] pinctrl: ocelot: Use devm_platform_get_and_ioremap_resource()
Date: Thu, 15 Sep 2022 23:14:38 +0800	[thread overview]
Message-ID: <20220915151438.699763-2-yangyingliang@huawei.com> (raw)
In-Reply-To: <20220915151438.699763-1-yangyingliang@huawei.com>

Switch to use devm_platform_get_and_ioremap_resource() to simplify code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 drivers/pinctrl/pinctrl-ocelot.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/pinctrl/pinctrl-ocelot.c b/drivers/pinctrl/pinctrl-ocelot.c
index 83703a3d291c..25698972030c 100644
--- a/drivers/pinctrl/pinctrl-ocelot.c
+++ b/drivers/pinctrl/pinctrl-ocelot.c
@@ -2079,8 +2079,7 @@ static int ocelot_pinctrl_probe(struct platform_device *pdev)
 	}
 	reset_control_reset(reset);
 
-	base = devm_ioremap_resource(dev,
-			platform_get_resource(pdev, IORESOURCE_MEM, 0));
+	base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
 	if (IS_ERR(base)) {
 		ret = PTR_ERR(base);
 		goto err_out;
-- 
2.25.1


  reply	other threads:[~2022-09-15 15:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-15 15:14 [PATCH -next 1/2] pinctrl: ocelot: add missing destroy_workqueue() in error path in ocelot_pinctrl_probe() Yang Yingliang
2022-09-15 15:14 ` Yang Yingliang [this message]
2022-09-16 19:01 ` Horatiu Vultur
2022-09-17  2:28   ` Yang Yingliang

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=20220915151438.699763-2-yangyingliang@huawei.com \
    --to=yangyingliang@huawei.com \
    --cc=horatiu.vultur@microchip.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=p.zabel@pengutronix.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 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.