summaryrefslogtreecommitdiff
path: root/drivers/rtc/rtc-armada38x.c
diff options
context:
space:
mode:
authorYe Xingchen <ye.xingchen@zte.com.cn>2023-03-22 11:30:31 +0800
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2023-04-28 08:07:23 +0200
commite99ab4abebf825de2ce65f6c6c32ee30e00bb077 (patch)
treefb8f741a2b8d47181f85c074ab8e05cd2fa231d6 /drivers/rtc/rtc-armada38x.c
parent916890539bc8a5674d363a1fc985633200c2117a (diff)
rtc: armada38x: 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 <ye.xingchen@zte.com.cn> Link: https://lore.kernel.org/r/202303221130316049449@zte.com.cn Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc/rtc-armada38x.c')
-rw-r--r--drivers/rtc/rtc-armada38x.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/rtc/rtc-armada38x.c b/drivers/rtc/rtc-armada38x.c
index cc542e6b1d5b..b4139c200676 100644
--- a/drivers/rtc/rtc-armada38x.c
+++ b/drivers/rtc/rtc-armada38x.c
@@ -491,7 +491,6 @@ MODULE_DEVICE_TABLE(of, armada38x_rtc_of_match_table);
static __init int armada38x_rtc_probe(struct platform_device *pdev)
{
- struct resource *res;
struct armada38x_rtc *rtc;
rtc = devm_kzalloc(&pdev->dev, sizeof(struct armada38x_rtc),
@@ -508,12 +507,10 @@ static __init int armada38x_rtc_probe(struct platform_device *pdev)
spin_lock_init(&rtc->lock);
- res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "rtc");
- rtc->regs = devm_ioremap_resource(&pdev->dev, res);
+ rtc->regs = devm_platform_ioremap_resource_byname(pdev, "rtc");
if (IS_ERR(rtc->regs))
return PTR_ERR(rtc->regs);
- res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "rtc-soc");
- rtc->regs_soc = devm_ioremap_resource(&pdev->dev, res);
+ rtc->regs_soc = devm_platform_ioremap_resource_byname(pdev, "rtc-soc");
if (IS_ERR(rtc->regs_soc))
return PTR_ERR(rtc->regs_soc);