summaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-ls1x.c
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@bootlin.com>2018-05-17 22:53:25 +0200
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2018-05-17 22:55:16 +0200
commit52f0e7bc19fb1397aa9d29f87415f94d39bb8b01 (patch)
treee31fdcc3c01acd754666e78e64e7a4831b7ec939 /drivers/rtc/rtc-ls1x.c
parent180c92c4ae7c76329c990dc55dc3d422e7640527 (diff)
downloadtalos-op-linux-52f0e7bc19fb1397aa9d29f87415f94d39bb8b01.tar.gz
talos-op-linux-52f0e7bc19fb1397aa9d29f87415f94d39bb8b01.zip
rtc: ls1x: switch to rtc_register_device
This allows for future improvement of the driver. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc/rtc-ls1x.c')
-rw-r--r--drivers/rtc/rtc-ls1x.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/rtc/rtc-ls1x.c b/drivers/rtc/rtc-ls1x.c
index de86f9fabc11..609bd1d013f0 100644
--- a/drivers/rtc/rtc-ls1x.c
+++ b/drivers/rtc/rtc-ls1x.c
@@ -173,15 +173,15 @@ static int ls1x_rtc_probe(struct platform_device *pdev)
while (readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_TTS)
usleep_range(1000, 3000);
- rtcdev = devm_rtc_device_register(&pdev->dev, "ls1x-rtc",
- &ls1x_rtc_ops , THIS_MODULE);
- if (IS_ERR(rtcdev)) {
- ret = PTR_ERR(rtcdev);
- goto err;
- }
+ rtcdev = devm_rtc_allocate_device(&pdev->dev);
+ if (IS_ERR(rtcdev))
+ return PTR_ERR(rtcdev);
platform_set_drvdata(pdev, rtcdev);
- return 0;
+ rtcdev->ops = &ls1x_rtc_ops;
+
+ return rtc_register_device(rtcdev);
+
err:
return ret;
}
OpenPOWER on IntegriCloud