mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/4] pinctrl: berlin: as370: Use devm_platform_get_and_ioremap_resource()
@ 2023-07-04 12:47 Yangtao Li
  2023-07-04 12:47 ` [PATCH 2/4] pinctrl: mvebu: " Yangtao Li
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Yangtao Li @ 2023-07-04 12:47 UTC (permalink / raw)
  To: Linus Walleij; +Cc: Yangtao Li, linux-gpio, linux-kernel

Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/pinctrl/berlin/pinctrl-as370.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/pinctrl/berlin/pinctrl-as370.c b/drivers/pinctrl/berlin/pinctrl-as370.c
index 9dfdc275ee33..b631c14813a7 100644
--- a/drivers/pinctrl/berlin/pinctrl-as370.c
+++ b/drivers/pinctrl/berlin/pinctrl-as370.c
@@ -341,8 +341,7 @@ static int as370_pinctrl_probe(struct platform_device *pdev)
 	if (!rmconfig)
 		return -ENOMEM;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	base = devm_ioremap_resource(&pdev->dev, res);
+	base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
 	if (IS_ERR(base))
 		return PTR_ERR(base);
 
-- 
2.39.0


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

end of thread, other threads:[~2023-07-16 21:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-04 12:47 [PATCH 1/4] pinctrl: berlin: as370: Use devm_platform_get_and_ioremap_resource() Yangtao Li
2023-07-04 12:47 ` [PATCH 2/4] pinctrl: mvebu: " Yangtao Li
2023-07-04 12:47 ` [PATCH 3/4] pinctrl: pic32: Convert to devm_platform_ioremap_resource() Yangtao Li
2023-07-04 12:47 ` [PATCH 4/4] pinctrl: ti: Convert to devm_platform_get_and_ioremap_resource() Yangtao Li
2023-07-16 21:09 ` [PATCH 1/4] pinctrl: berlin: as370: Use devm_platform_get_and_ioremap_resource() Linus Walleij

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®