All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pinctrl: berlin: bg4ct: Use devm_platform_*ioremap_resource() APIs
@ 2022-05-20  5:20 zhaoxiao
  2022-05-22 20:46 ` Linus Walleij
  0 siblings, 1 reply; 2+ messages in thread
From: zhaoxiao @ 2022-05-20  5:20 UTC (permalink / raw)
  To: linus.walleij; +Cc: linux-gpio, linux-kernel, zhaoxiao

Use devm_platform_get_and_ioremap_resource() and
devm_platform_ioremap_resource() APIs instead of their
open coded analogues.

Signed-off-by: zhaoxiao <zhaoxiao@uniontech.com>
---
 drivers/pinctrl/berlin/berlin-bg4ct.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/pinctrl/berlin/berlin-bg4ct.c b/drivers/pinctrl/berlin/berlin-bg4ct.c
index 6a7fe929a68b..3026a3b3da2d 100644
--- a/drivers/pinctrl/berlin/berlin-bg4ct.c
+++ b/drivers/pinctrl/berlin/berlin-bg4ct.c
@@ -460,8 +460,7 @@ static int berlin4ct_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.20.1




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

* Re: [PATCH] pinctrl: berlin: bg4ct: Use devm_platform_*ioremap_resource() APIs
  2022-05-20  5:20 [PATCH] pinctrl: berlin: bg4ct: Use devm_platform_*ioremap_resource() APIs zhaoxiao
@ 2022-05-22 20:46 ` Linus Walleij
  0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2022-05-22 20:46 UTC (permalink / raw)
  To: zhaoxiao; +Cc: linux-gpio, linux-kernel

On Fri, May 20, 2022 at 7:20 AM zhaoxiao <zhaoxiao@uniontech.com> wrote:

> Use devm_platform_get_and_ioremap_resource() and
> devm_platform_ioremap_resource() APIs instead of their
> open coded analogues.
>
> Signed-off-by: zhaoxiao <zhaoxiao@uniontech.com>

Patch applied!

Yours,
Linus Walleij

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

end of thread, other threads:[~2022-05-22 20:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-20  5:20 [PATCH] pinctrl: berlin: bg4ct: Use devm_platform_*ioremap_resource() APIs zhaoxiao
2022-05-22 20:46 ` Linus Walleij

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.