aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-lpc32xx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/rtc/rtc-lpc32xx.c')
-rw-r--r--drivers/rtc/rtc-lpc32xx.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/rtc/rtc-lpc32xx.c b/drivers/rtc/rtc-lpc32xx.c
index 40a598332bac..787550d756e9 100644
--- a/drivers/rtc/rtc-lpc32xx.c
+++ b/drivers/rtc/rtc-lpc32xx.c
@@ -273,8 +273,8 @@ static int lpc32xx_rtc_probe(struct platform_device *pdev)
273 273
274 platform_set_drvdata(pdev, rtc); 274 platform_set_drvdata(pdev, rtc);
275 275
276 rtc->rtc = rtc_device_register(RTC_NAME, &pdev->dev, &lpc32xx_rtc_ops, 276 rtc->rtc = devm_rtc_device_register(&pdev->dev, RTC_NAME,
277 THIS_MODULE); 277 &lpc32xx_rtc_ops, THIS_MODULE);
278 if (IS_ERR(rtc->rtc)) { 278 if (IS_ERR(rtc->rtc)) {
279 dev_err(&pdev->dev, "Can't get RTC\n"); 279 dev_err(&pdev->dev, "Can't get RTC\n");
280 platform_set_drvdata(pdev, NULL); 280 platform_set_drvdata(pdev, NULL);
@@ -307,7 +307,6 @@ static int lpc32xx_rtc_remove(struct platform_device *pdev)
307 device_init_wakeup(&pdev->dev, 0); 307 device_init_wakeup(&pdev->dev, 0);
308 308
309 platform_set_drvdata(pdev, NULL); 309 platform_set_drvdata(pdev, NULL);
310 rtc_device_unregister(rtc->rtc);
311 310
312 return 0; 311 return 0;
313} 312}