patch-2.1.107 linux/drivers/char/rtc.c

Next file: linux/drivers/char/selection.c
Previous file: linux/drivers/char/random.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.106/linux/drivers/char/rtc.c linux/drivers/char/rtc.c
@@ -134,11 +134,8 @@
 	rtc_irq_data |= (CMOS_READ(RTC_INTR_FLAGS) & 0xF0);
 	wake_up_interruptible(&rtc_wait);	
 
-	if (rtc_status & RTC_TIMER_ON) {
-		del_timer(&rtc_irq_timer);
-		rtc_irq_timer.expires = jiffies + HZ/rtc_freq + 2*HZ/100;
-		add_timer(&rtc_irq_timer);
-	}
+	if (rtc_status & RTC_TIMER_ON)
+		mod_timer(&rtc_irq_timer, jiffies + HZ/rtc_freq + 2*HZ/100);
 }
 
 /*
@@ -596,9 +593,7 @@
 	unsigned long flags;
 
 	printk(KERN_INFO "rtc: lost some interrupts at %ldHz.\n", rtc_freq);
-	del_timer(&rtc_irq_timer);
-	rtc_irq_timer.expires = jiffies + HZ/rtc_freq + 2*HZ/100;
-	add_timer(&rtc_irq_timer);
+	mod_timer(&rtc_irq_timer, jiffies + HZ/rtc_freq + 2*HZ/100);
 
 	save_flags(flags);
 	cli();

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov