[PATCH] small rtc.c fix

From: Cesar Eduardo Barros (cesarb@nitnet.com.br)
Date: Thu May 18 2000 - 19:37:55 EST


This patch fixes a simple thinko in my last rtc patch which could in completely
unlikely situations printk a wrong frequency value in rtc_dropped_irq (harmless
but wrong anyway).

I'm still a bit wary about putting printk inside a spinlock critical region.
Comments?

--- linux-2.3.99-pre7-6/drivers/char/rtc.c Sat May 6 10:17:51 2000
+++ linux-2.3.99-pre7-6+rtcfix/drivers/char/rtc.c Mon May 8 16:29:35 2000
@@ -760,9 +760,9 @@
 
 static void rtc_dropped_irq(unsigned long data)
 {
- printk(KERN_INFO "rtc: lost some interrupts at %ldHz.\n", rtc_freq);
-
         spin_lock_irq (&rtc_lock);
+
+ printk(KERN_INFO "rtc: lost some interrupts at %ldHz.\n", rtc_freq);
 
         /* Just in case someone disabled the timer from behind our back... */
         if (rtc_status & RTC_TIMER_ON)

-- 
Cesar Eduardo Barros
cesarb@nitnet.com.br
cesarb@dcc.ufrj.br

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue May 23 2000 - 21:00:16 EST