projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
479243b
)
rtc: rtc-ls1x: use devm_rtc_device_register()
author
Jingoo Han
<jg1.han@samsung.com>
Mon, 29 Apr 2013 23:19:39 +0000
(16:19 -0700)
committer
Linus Torvalds
<torvalds@linux-foundation.org>
Tue, 30 Apr 2013 01:28:30 +0000
(18:28 -0700)
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>
drivers/rtc/rtc-ls1x.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/rtc/rtc-ls1x.c
b/drivers/rtc/rtc-ls1x.c
index f59b6349551affbc0c235c4366420f8070fb5f05..db82f91f456254f77f88f2cd50c862f169ea7aa3 100644
(file)
--- a/
drivers/rtc/rtc-ls1x.c
+++ b/
drivers/rtc/rtc-ls1x.c
@@
-172,7
+172,7
@@
static int ls1x_rtc_probe(struct platform_device *pdev)
while (readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_TTS)
usleep_range(1000, 3000);
- rtcdev =
rtc_device_register("ls1x-rtc", &pdev->dev
,
+ rtcdev =
devm_rtc_device_register(&pdev->dev, "ls1x-rtc"
,
&ls1x_rtc_ops , THIS_MODULE);
if (IS_ERR(rtcdev)) {
ret = PTR_ERR(rtcdev);
@@
-187,9
+187,6
@@
err:
static int ls1x_rtc_remove(struct platform_device *pdev)
{
- struct rtc_device *rtcdev = platform_get_drvdata(pdev);
-
- rtc_device_unregister(rtcdev);
platform_set_drvdata(pdev, NULL);
return 0;