[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220915151438.699763-2-yangyingliang@huawei.com>
Date: Thu, 15 Sep 2022 23:14:38 +0800
From: Yang Yingliang <yangyingliang@...wei.com>
To: <linux-gpio@...r.kernel.org>, <linux-kernel@...r.kernel.org>
CC: <linus.walleij@...aro.org>, <p.zabel@...gutronix.de>,
<horatiu.vultur@...rochip.com>
Subject: [PATCH -next 2/2] pinctrl: ocelot: Use devm_platform_get_and_ioremap_resource()
Switch to use devm_platform_get_and_ioremap_resource() to simplify code.
Signed-off-by: Yang Yingliang <yangyingliang@...wei.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
Powered by blists - more mailing lists