projects
/
GitHub
/
LineageOS
/
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:
90158d8
)
sparc32: Need to close openned RTC device just like sparc64.
author
David S. Miller
<davem@davemloft.net>
Wed, 10 Sep 2008 20:36:13 +0000
(13:36 -0700)
committer
David S. Miller
<davem@davemloft.net>
Wed, 10 Sep 2008 20:36:13 +0000
(13:36 -0700)
Otherwise we get refcount problems.
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/kernel/time.c
patch
|
blob
|
blame
|
history
diff --git
a/arch/sparc/kernel/time.c
b/arch/sparc/kernel/time.c
index 698c45059fa5442ee496eae4a618c7afa789edb2..fa54d585f558c3bcbe125d7c532a362263a2c50a 100644
(file)
--- a/
arch/sparc/kernel/time.c
+++ b/
arch/sparc/kernel/time.c
@@
-337,9
+337,12
@@
static int sbus_do_settimeofday(struct timespec *tv)
static int set_rtc_mmss(unsigned long secs)
{
struct rtc_device *rtc = rtc_class_open("rtc0");
+ int err = -1;
- if (rtc)
- return rtc_set_mmss(rtc, secs);
+ if (rtc) {
+ err = rtc_set_mmss(rtc, secs);
+ rtc_class_close(rtc);
+ }
- return
-1
;
+ return
err
;
}