patch for rtc.c to use mod_timer instead of del_timer/add_timer

Amos Shapira (amos@gezernet.co.il)
Wed, 24 Jun 1998 22:59:54 +0400


Hello,

Not much to say - based on 2.1.106-ac4
----------------------------------------------------------------------
--- drivers/char/rtc.c~ Wed May 6 20:56:03 1998
+++ drivers/char/rtc.c Wed Jun 24 22:57:11 1998
@@ -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();
----------------------------------------------------------------------

Cheers,

--Amos

--Amos Shapira | "Of course Australia was marked for
133 Shlomo Ben-Yosef st. | glory, for its people had been chosen
Jerusalem 93 805 | by the finest judges in England."
ISRAEL amos@gezernet.co.il | -- Anonymous

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu