diff options
Diffstat (limited to 'drivers/rtc/rtc-wm831x.c')
-rw-r--r-- | drivers/rtc/rtc-wm831x.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/rtc/rtc-wm831x.c b/drivers/rtc/rtc-wm831x.c index 2f0ac7b30a0c..8d65b94e5a7e 100644 --- a/drivers/rtc/rtc-wm831x.c +++ b/drivers/rtc/rtc-wm831x.c | |||
@@ -436,7 +436,7 @@ static int wm831x_rtc_probe(struct platform_device *pdev) | |||
436 | 436 | ||
437 | device_init_wakeup(&pdev->dev, 1); | 437 | device_init_wakeup(&pdev->dev, 1); |
438 | 438 | ||
439 | wm831x_rtc->rtc = rtc_device_register("wm831x", &pdev->dev, | 439 | wm831x_rtc->rtc = devm_rtc_device_register(&pdev->dev, "wm831x", |
440 | &wm831x_rtc_ops, THIS_MODULE); | 440 | &wm831x_rtc_ops, THIS_MODULE); |
441 | if (IS_ERR(wm831x_rtc->rtc)) { | 441 | if (IS_ERR(wm831x_rtc->rtc)) { |
442 | ret = PTR_ERR(wm831x_rtc->rtc); | 442 | ret = PTR_ERR(wm831x_rtc->rtc); |
@@ -462,10 +462,6 @@ err: | |||
462 | 462 | ||
463 | static int wm831x_rtc_remove(struct platform_device *pdev) | 463 | static int wm831x_rtc_remove(struct platform_device *pdev) |
464 | { | 464 | { |
465 | struct wm831x_rtc *wm831x_rtc = platform_get_drvdata(pdev); | ||
466 | |||
467 | rtc_device_unregister(wm831x_rtc->rtc); | ||
468 | |||
469 | return 0; | 465 | return 0; |
470 | } | 466 | } |
471 | 467 | ||