patch-2.4.0-test4 linux/drivers/char/pcwd.c

Next file: linux/drivers/char/ppdev.c
Previous file: linux/drivers/char/pcmcia/Config.in
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test3/linux/drivers/char/pcwd.c linux/drivers/char/pcwd.c
@@ -63,6 +63,7 @@
 #include <linux/init.h>
 #include <linux/proc_fs.h>
 #include <linux/spinlock.h>
+#include <linux/smp_lock.h>
 
 #include <asm/uaccess.h>
 #include <asm/io.h>
@@ -451,6 +452,7 @@
 {
 	if (MINOR(ino->i_rdev)==WATCHDOG_MINOR)
 	{
+		lock_kernel();
 	        is_open = 0;
 #ifndef CONFIG_WATCHDOG_NOWAYOUT
 		/*  Disable the board  */
@@ -460,6 +462,7 @@
 			outb_p(0xA5, current_readport + 3);
 			spin_unlock(&io_lock);
 		}
+		unlock_kernel();
 #endif
 	}
 	return 0;

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