diff mbox series

[3/6] power: reset: brcm-kona: Convert to devm_platform_ioremap_resource()

Message ID 20230704130309.16444-3-frank.li@vivo.com
State Accepted
Commit 79d2a09d953fd1939b16e4baf83ab60d2b305e59
Headers show
Series [1/6] power: reset: at91-poweroff: Convert to devm_platform_ioremap_resource() | expand

Commit Message

李扬韬 July 4, 2023, 1:03 p.m. UTC
Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/power/reset/brcm-kona-reset.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Florian Fainelli July 4, 2023, 2:48 p.m. UTC | #1
On 7/4/2023 3:03 PM, Yangtao Li wrote:
> Use devm_platform_ioremap_resource() to simplify code.
> 
> Signed-off-by: Yangtao Li <frank.li@vivo.com>

Acked-by: Florian Fainelli <florian.fainelli@broadcom.com>
diff mbox series

Patch

diff --git a/drivers/power/reset/brcm-kona-reset.c b/drivers/power/reset/brcm-kona-reset.c
index 3de024e3ceb7..6444f6154761 100644
--- a/drivers/power/reset/brcm-kona-reset.c
+++ b/drivers/power/reset/brcm-kona-reset.c
@@ -38,9 +38,7 @@  static struct notifier_block kona_reset_nb = {
 
 static int kona_reset_probe(struct platform_device *pdev)
 {
-	struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-
-	kona_reset_base = devm_ioremap_resource(&pdev->dev, res);
+	kona_reset_base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(kona_reset_base))
 		return PTR_ERR(kona_reset_base);