patch-2.3.99-pre7 linux/drivers/char/dtlk.c

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

diff -u --recursive --new-file v2.3.99-pre6/linux/drivers/char/dtlk.c linux/drivers/char/dtlk.c
@@ -241,6 +241,8 @@
 static unsigned int dtlk_poll(struct file *file, poll_table * wait)
 {
 	int mask = 0;
+	unsigned long expires;
+
 	TRACE_TEXT(" dtlk_poll");
 	/*
 	   static long int j;
@@ -261,9 +263,8 @@
 	/* there are no exception conditions */
 
 	/* There won't be any interrupts, so we set a timer instead. */
-	del_timer(&dtlk_timer);
-	dtlk_timer.expires = jiffies + 3*HZ / 100;
-	add_timer(&dtlk_timer);
+	expires = jiffies + 3*HZ / 100;
+	mod_timer(&dtlk_timer, expires);
 
 	return mask;
 }

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