Merge commit 'linus/master' into merge-linus
[cascardo/linux.git] / arch / sparc / kernel / time.c
index 698c450..62c1d94 100644 (file)
@@ -73,7 +73,6 @@ unsigned long profile_pc(struct pt_regs *regs)
 EXPORT_SYMBOL(profile_pc);
 
 __volatile__ unsigned int *master_l10_counter;
-__volatile__ unsigned int *master_l10_limit;
 
 /*
  * timer_interrupt() needs to keep up the real-time clock,
@@ -337,9 +336,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;
 }