diff options
Diffstat (limited to 'drivers/rtc/rtc-st-lpc.c')
-rw-r--r-- | drivers/rtc/rtc-st-lpc.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/rtc/rtc-st-lpc.c b/drivers/rtc/rtc-st-lpc.c index 49474a31c66d..f1c5471073bc 100644 --- a/drivers/rtc/rtc-st-lpc.c +++ b/drivers/rtc/rtc-st-lpc.c @@ -186,7 +186,6 @@ static int st_rtc_probe(struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node; struct st_rtc *rtc; - struct resource *res; uint32_t mode; int ret = 0; @@ -210,8 +209,7 @@ static int st_rtc_probe(struct platform_device *pdev) spin_lock_init(&rtc->lock); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - rtc->ioaddr = devm_ioremap_resource(&pdev->dev, res); + rtc->ioaddr = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(rtc->ioaddr)) return PTR_ERR(rtc->ioaddr); |