From: Yangtao Li Date: Tue, 4 Jul 2023 13:03:06 +0000 (+0800) Subject: power: reset: gemini-poweroff: Convert to devm_platform_ioremap_resource() X-Git-Tag: v6.6.17~4107^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=808e964e302f4e7b2a84d9f87c7cfd2bdd62a4e5;p=platform%2Fkernel%2Flinux-rpi.git power: reset: gemini-poweroff: Convert to devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Signed-off-by: Sebastian Reichel --- diff --git a/drivers/power/reset/gemini-poweroff.c b/drivers/power/reset/gemini-poweroff.c index b7f7a82..d309b61 100644 --- a/drivers/power/reset/gemini-poweroff.c +++ b/drivers/power/reset/gemini-poweroff.c @@ -91,7 +91,6 @@ static void gemini_poweroff(void) static int gemini_poweroff_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - struct resource *res; struct gemini_powercon *gpw; u32 val; int irq; @@ -101,8 +100,7 @@ static int gemini_poweroff_probe(struct platform_device *pdev) if (!gpw) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - gpw->base = devm_ioremap_resource(dev, res); + gpw->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(gpw->base)) return PTR_ERR(gpw->base);