patch-2.3.19 linux/drivers/char/softdog.c
Next file: linux/drivers/char/tuner.c
Previous file: linux/drivers/char/serial.c
Back to the patch index
Back to the overall index
-  Lines: 23
-  Date:
Sat Oct  2 07:36:17 1999
-  Orig file: 
v2.3.18/linux/drivers/char/softdog.c
-  Orig date: 
Thu Aug  5 14:34:02 1999
diff -u --recursive --new-file v2.3.18/linux/drivers/char/softdog.c linux/drivers/char/softdog.c
@@ -23,6 +23,9 @@
  *	Added soft_margin; use upon insmod to change the timer delay.
  *	NB: uses same minor as wdt (WATCHDOG_MINOR); we could use separate
  *	    minors.
+ *
+ *  19980911 Alan Cox
+ *	Made SMP safe for 2.3.x
  */
  
 #include <linux/module.h>
@@ -106,10 +109,8 @@
 	/*
 	 *	Refresh the timer.
 	 */
-	del_timer(&watchdog_ticktock);
-	watchdog_ticktock.expires=jiffies + (soft_margin * HZ);
-	add_timer(&watchdog_ticktock);
-	return;
+
+	mod_timer(&watchdog_ticktock, jiffies + (soft_margin * HZ));
 }
 
 static ssize_t softdog_write(struct file *file, const char *data, size_t len, loff_t *ppos)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)