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:
David S. Miller 2008-09-10 13:36:13 -07:00
parent 90158d84eb
commit ab138c031f

View File

@ -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);
return -1;
if (rtc) {
err = rtc_set_mmss(rtc, secs);
rtc_class_close(rtc);
}
return err;
}