patch-2.3.99-pre9 linux/drivers/char/rtc.c

Next file: linux/drivers/char/sh-sci.c
Previous file: linux/drivers/char/rio/unixrup.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.99-pre8/linux/drivers/char/rtc.c linux/drivers/char/rtc.c
@@ -760,7 +760,7 @@
 
 static void rtc_dropped_irq(unsigned long data)
 {
-	printk(KERN_INFO "rtc: lost some interrupts at %ldHz.\n", rtc_freq);
+	unsigned long freq;
 
 	spin_lock_irq (&rtc_lock);
 
@@ -771,7 +771,12 @@
 	rtc_irq_data += ((rtc_freq/HZ)<<8);
 	rtc_irq_data &= ~0xff;
 	rtc_irq_data |= (CMOS_READ(RTC_INTR_FLAGS) & 0xF0);	/* restart */
+
+	freq = rtc_freq;
+
 	spin_unlock_irq(&rtc_lock);
+
+	printk(KERN_INFO "rtc: lost some interrupts at %ldHz.\n", freq);
 
 	/* Now we have new data */
 	wake_up_interruptible(&rtc_wait);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)