sparc32: Need to close openned RTC device just like sparc64.
Otherwise we get refcount problems. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
90158d84eb
commit
ab138c031f
1 changed files with 6 additions and 3 deletions
|
@ -337,9 +337,12 @@ static int sbus_do_settimeofday(struct timespec *tv)
|
||||||
static int set_rtc_mmss(unsigned long secs)
|
static int set_rtc_mmss(unsigned long secs)
|
||||||
{
|
{
|
||||||
struct rtc_device *rtc = rtc_class_open("rtc0");
|
struct rtc_device *rtc = rtc_class_open("rtc0");
|
||||||
|
int err = -1;
|
||||||
|
|
||||||
if (rtc)
|
if (rtc) {
|
||||||
return rtc_set_mmss(rtc, secs);
|
err = rtc_set_mmss(rtc, secs);
|
||||||
|
rtc_class_close(rtc);
|
||||||
|
}
|
||||||
|
|
||||||
return -1;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue