aboutsummaryrefslogtreecommitdiff
path: root/drivers/rtc/rtc-snvs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/rtc/rtc-snvs.c')
-rw-r--r--drivers/rtc/rtc-snvs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/rtc/rtc-snvs.c b/drivers/rtc/rtc-snvs.c
index d5ec7854a65..40662e9dc0a 100644
--- a/drivers/rtc/rtc-snvs.c
+++ b/drivers/rtc/rtc-snvs.c
@@ -252,9 +252,9 @@ static int snvs_rtc_probe(struct platform_device *pdev)
return -ENOMEM;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- data->ioaddr = devm_request_and_ioremap(&pdev->dev, res);
- if (!data->ioaddr)
- return -EADDRNOTAVAIL;
+ data->ioaddr = devm_ioremap_resource(&pdev->dev, res);
+ if (IS_ERR(data->ioaddr))
+ return PTR_ERR(data->ioaddr);
data->irq = platform_get_irq(pdev, 0);
if (data->irq < 0)