From: Ye Xingchen Date: Wed, 22 Mar 2023 03:31:58 +0000 (+0800) Subject: rtc: sunplus: use devm_platform_ioremap_resource_byname() X-Git-Tag: v6.6.17~4948^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=916890539bc8a5674d363a1fc985633200c2117a;p=platform%2Fkernel%2Flinux-rpi.git rtc: sunplus: use devm_platform_ioremap_resource_byname() Convert platform_get_resource_byname(),devm_ioremap_resource() to a single call to devm_platform_ioremap_resource_byname(), as this is exactly what this function does. Signed-off-by: Ye Xingchen Link: https://lore.kernel.org/r/202303221131581039486@zte.com.cn Signed-off-by: Alexandre Belloni --- diff --git a/drivers/rtc/rtc-sunplus.c b/drivers/rtc/rtc-sunplus.c index 44b8083..f33dc30 100644 --- a/drivers/rtc/rtc-sunplus.c +++ b/drivers/rtc/rtc-sunplus.c @@ -235,8 +235,7 @@ static int sp_rtc_probe(struct platform_device *plat_dev) if (!sp_rtc) return -ENOMEM; - sp_rtc->res = platform_get_resource_byname(plat_dev, IORESOURCE_MEM, RTC_REG_NAME); - sp_rtc->reg_base = devm_ioremap_resource(&plat_dev->dev, sp_rtc->res); + sp_rtc->reg_base = devm_platform_ioremap_resource_byname(plat_dev, RTC_REG_NAME); if (IS_ERR(sp_rtc->reg_base)) return dev_err_probe(&plat_dev->dev, PTR_ERR(sp_rtc->reg_base), "%s devm_ioremap_resource fail\n", RTC_REG_NAME);