aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-ab3100.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/rtc/rtc-ab3100.c')
-rw-r--r--drivers/rtc/rtc-ab3100.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/rtc/rtc-ab3100.c b/drivers/rtc/rtc-ab3100.c
index c2f12d370009..47a4f2c4d30e 100644
--- a/drivers/rtc/rtc-ab3100.c
+++ b/drivers/rtc/rtc-ab3100.c
@@ -229,8 +229,8 @@ static int __init ab3100_rtc_probe(struct platform_device *pdev)
229 /* Ignore any error on this write */ 229 /* Ignore any error on this write */
230 } 230 }
231 231
232 rtc = rtc_device_register("ab3100-rtc", &pdev->dev, &ab3100_rtc_ops, 232 rtc = devm_rtc_device_register(&pdev->dev, "ab3100-rtc",
233 THIS_MODULE); 233 &ab3100_rtc_ops, THIS_MODULE);
234 if (IS_ERR(rtc)) { 234 if (IS_ERR(rtc)) {
235 err = PTR_ERR(rtc); 235 err = PTR_ERR(rtc);
236 return err; 236 return err;
@@ -242,9 +242,6 @@ static int __init ab3100_rtc_probe(struct platform_device *pdev)
242 242
243static int __exit ab3100_rtc_remove(struct platform_device *pdev) 243static int __exit ab3100_rtc_remove(struct platform_device *pdev)
244{ 244{
245 struct rtc_device *rtc = platform_get_drvdata(pdev);
246
247 rtc_device_unregister(rtc);
248 platform_set_drvdata(pdev, NULL); 245 platform_set_drvdata(pdev, NULL);
249 return 0; 246 return 0;
250} 247}