diff options
Diffstat (limited to 'drivers/rtc/rtc-cadence.c')
-rw-r--r-- | drivers/rtc/rtc-cadence.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/rtc/rtc-cadence.c b/drivers/rtc/rtc-cadence.c index 592aae23cbaf..595d5d252850 100644 --- a/drivers/rtc/rtc-cadence.c +++ b/drivers/rtc/rtc-cadence.c @@ -255,7 +255,6 @@ static const struct rtc_class_ops cdns_rtc_ops = { static int cdns_rtc_probe(struct platform_device *pdev) { struct cdns_rtc *crtc; - struct resource *res; int ret; unsigned long ref_clk_freq; @@ -263,8 +262,7 @@ static int cdns_rtc_probe(struct platform_device *pdev) if (!crtc) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - crtc->regs = devm_ioremap_resource(&pdev->dev, res); + crtc->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(crtc->regs)) return PTR_ERR(crtc->regs); |