summaryrefslogtreecommitdiff
path: root/drivers/rtc/rtc-spear.c
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-04-30 03:19:13 +0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-30 05:28:27 +0400
commit246b1a997ba1e601586f5f1867c34ff7bcb2dfd2 (patch)
tree4958de0658037993ed495d42c48c1fc1fbe4e400 /drivers/rtc/rtc-spear.c
parent904784c11369dbfd35a7d7e4abaf85b2f2b51000 (diff)
downloadlinux-246b1a997ba1e601586f5f1867c34ff7bcb2dfd2.tar.xz
rtc: rtc-spear: 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> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rtc/rtc-spear.c')
-rw-r--r--drivers/rtc/rtc-spear.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/rtc/rtc-spear.c b/drivers/rtc/rtc-spear.c
index a18c3192ed40..db3ef610dd7c 100644
--- a/drivers/rtc/rtc-spear.c
+++ b/drivers/rtc/rtc-spear.c
@@ -400,8 +400,8 @@ static int spear_rtc_probe(struct platform_device *pdev)
spin_lock_init(&config->lock);
platform_set_drvdata(pdev, config);
- config->rtc = rtc_device_register(pdev->name, &pdev->dev,
- &spear_rtc_ops, THIS_MODULE);
+ config->rtc = devm_rtc_device_register(&pdev->dev, pdev->name,
+ &spear_rtc_ops, THIS_MODULE);
if (IS_ERR(config->rtc)) {
dev_err(&pdev->dev, "can't register RTC device, err %ld\n",
PTR_ERR(config->rtc));
@@ -427,7 +427,6 @@ static int spear_rtc_remove(struct platform_device *pdev)
{
struct spear_rtc_config *config = platform_get_drvdata(pdev);
- rtc_device_unregister(config->rtc);
spear_rtc_disable_interrupt(config);
clk_disable_unprepare(config->clk);
device_init_wakeup(&pdev->dev, 0);