diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-04-29 23:19:03 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-30 01:28:25 (GMT) |
commit | 04f70e4ca44d284b379304395699573f3b475bea (patch) | |
tree | 0555c38aa4bdfc88e8ab20aa43ecd6ce238076e2 | |
parent | 5d65cbfbc81d66b71f853488f53373352f06e44e (diff) | |
download | linux-fsl-qoriq-04f70e4ca44d284b379304395699573f3b475bea.tar.xz |
rtc: rtc-imxdi: 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-imxdi.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/rtc/rtc-imxdi.c b/drivers/rtc/rtc-imxdi.c index a5a143e..d3a8c8e 100644 --- a/drivers/rtc/rtc-imxdi.c +++ b/drivers/rtc/rtc-imxdi.c @@ -464,7 +464,7 @@ static int __init dryice_rtc_probe(struct platform_device *pdev) } platform_set_drvdata(pdev, imxdi); - imxdi->rtc = rtc_device_register(pdev->name, &pdev->dev, + imxdi->rtc = devm_rtc_device_register(&pdev->dev, pdev->name, &dryice_rtc_ops, THIS_MODULE); if (IS_ERR(imxdi->rtc)) { rc = PTR_ERR(imxdi->rtc); @@ -488,8 +488,6 @@ static int __exit dryice_rtc_remove(struct platform_device *pdev) /* mask all interrupts */ __raw_writel(0, imxdi->ioaddr + DIER); - rtc_device_unregister(imxdi->rtc); - clk_disable_unprepare(imxdi->clk); return 0; |