diff options
Diffstat (limited to 'drivers/rtc/rtc-st-lpc.c')
-rw-r--r-- | drivers/rtc/rtc-st-lpc.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/rtc/rtc-st-lpc.c b/drivers/rtc/rtc-st-lpc.c index 49474a31c66d..51041dc08af4 100644 --- a/drivers/rtc/rtc-st-lpc.c +++ b/drivers/rtc/rtc-st-lpc.c @@ -41,7 +41,6 @@ struct st_rtc { struct rtc_device *rtc_dev; struct rtc_wkalrm alarm; - struct resource *res; struct clk *clk; unsigned long clkrate; void __iomem *ioaddr; @@ -186,7 +185,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 +208,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); |