From 19223ffa3d84f66ccb09a154dfa26cd40034595c Mon Sep 17 00:00:00 2001 From: Yangtao Li Date: Tue, 4 Jul 2023 21:03:07 +0800 Subject: power: reset: msm: Convert to devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Signed-off-by: Sebastian Reichel --- drivers/power/reset/msm-poweroff.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'drivers/power') diff --git a/drivers/power/reset/msm-poweroff.c b/drivers/power/reset/msm-poweroff.c index 0c439f83bf65..b9a401bd280b 100644 --- a/drivers/power/reset/msm-poweroff.c +++ b/drivers/power/reset/msm-poweroff.c @@ -35,11 +35,7 @@ static void do_msm_poweroff(void) static int msm_restart_probe(struct platform_device *pdev) { - struct device *dev = &pdev->dev; - struct resource *mem; - - mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - msm_ps_hold = devm_ioremap_resource(dev, mem); + msm_ps_hold = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(msm_ps_hold)) return PTR_ERR(msm_ps_hold); -- cgit v1.2.3