diff options
Diffstat (limited to 'drivers/rtc/rtc-rs5c313.c')
-rw-r--r-- | drivers/rtc/rtc-rs5c313.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/rtc/rtc-rs5c313.c b/drivers/rtc/rtc-rs5c313.c index d98ea5b759c8..8089fc63e403 100644 --- a/drivers/rtc/rtc-rs5c313.c +++ b/drivers/rtc/rtc-rs5c313.c | |||
@@ -367,7 +367,7 @@ static const struct rtc_class_ops rs5c313_rtc_ops = { | |||
367 | 367 | ||
368 | static int rs5c313_rtc_probe(struct platform_device *pdev) | 368 | static int rs5c313_rtc_probe(struct platform_device *pdev) |
369 | { | 369 | { |
370 | struct rtc_device *rtc = rtc_device_register("rs5c313", &pdev->dev, | 370 | struct rtc_device *rtc = devm_rtc_device_register(&pdev->dev, "rs5c313", |
371 | &rs5c313_rtc_ops, THIS_MODULE); | 371 | &rs5c313_rtc_ops, THIS_MODULE); |
372 | 372 | ||
373 | if (IS_ERR(rtc)) | 373 | if (IS_ERR(rtc)) |
@@ -380,10 +380,6 @@ static int rs5c313_rtc_probe(struct platform_device *pdev) | |||
380 | 380 | ||
381 | static int rs5c313_rtc_remove(struct platform_device *pdev) | 381 | static int rs5c313_rtc_remove(struct platform_device *pdev) |
382 | { | 382 | { |
383 | struct rtc_device *rtc = platform_get_drvdata( pdev ); | ||
384 | |||
385 | rtc_device_unregister(rtc); | ||
386 | |||
387 | return 0; | 383 | return 0; |
388 | } | 384 | } |
389 | 385 | ||