diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-04-29 19:19:47 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-29 21:28:31 -0400 |
commit | 284e2fa1da00a998db01b9b5d98e7a8fabc8d1ad (patch) | |
tree | d1ff724bd41fa1c968d6a168f3237752aef7c653 | |
parent | 8b7980dbf9e69d36916830f44b206a1e1cfcd174 (diff) |
rtc: rtc-rs5c313: use devm_rtc_device_register()
devm_rtc_device_register() is device managed and makes cleanup paths
simpler.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-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 | ||