提交 ab138c03 编写于 作者: D David S. Miller

sparc32: Need to close openned RTC device just like sparc64.

Otherwise we get refcount problems.
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 90158d84
......@@ -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;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册