diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-04-29 16:19:46 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-29 18:28:31 -0700 |
commit | 8b7980dbf9e69d36916830f44b206a1e1cfcd174 (patch) | |
tree | 144b589a27809614a747e6b43e8d7fd911bcf5e2 /drivers/rtc/rtc-rc5t583.c | |
parent | 9b6d955aedf84ab5e97cda73c6df9ea17952a3d4 (diff) | |
download | talos-obmc-linux-8b7980dbf9e69d36916830f44b206a1e1cfcd174.tar.gz talos-obmc-linux-8b7980dbf9e69d36916830f44b206a1e1cfcd174.zip |
rtc: rtc-rc5t583: 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>
Diffstat (limited to 'drivers/rtc/rtc-rc5t583.c')
-rw-r--r-- | drivers/rtc/rtc-rc5t583.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/rtc/rtc-rc5t583.c b/drivers/rtc/rtc-rc5t583.c index eb3194d664a8..518908d9d6aa 100644 --- a/drivers/rtc/rtc-rc5t583.c +++ b/drivers/rtc/rtc-rc5t583.c @@ -256,7 +256,7 @@ static int rc5t583_rtc_probe(struct platform_device *pdev) } device_init_wakeup(&pdev->dev, 1); - ricoh_rtc->rtc = rtc_device_register(pdev->name, &pdev->dev, + ricoh_rtc->rtc = devm_rtc_device_register(&pdev->dev, pdev->name, &rc5t583_rtc_ops, THIS_MODULE); if (IS_ERR(ricoh_rtc->rtc)) { ret = PTR_ERR(ricoh_rtc->rtc); @@ -276,8 +276,6 @@ static int rc5t583_rtc_remove(struct platform_device *pdev) struct rc5t583_rtc *rc5t583_rtc = dev_get_drvdata(&pdev->dev); rc5t583_rtc_alarm_irq_enable(&rc5t583_rtc->rtc->dev, 0); - - rtc_device_unregister(rc5t583_rtc->rtc); return 0; } |