summaryrefslogtreecommitdiffstats
path: root/drivers/char/mixcomwd.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-07-15 03:32:22 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-07-15 03:32:22 +0000
commitf1da2c3860e301527d56a1ef0b56c649ee7c4b1b (patch)
tree562b5d2e8b9cb62eb983d78ff6bcf9789e08fcf6 /drivers/char/mixcomwd.c
parent00f11569ac8ca73cbcdef8822de1583e79aee571 (diff)
Merge with Linux 2.4.0-test5-pre1. This works again on Origin UP.
The IP22 cache bugs which are plaguing some machines are still unfixed.
Diffstat (limited to 'drivers/char/mixcomwd.c')
-rw-r--r--drivers/char/mixcomwd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/char/mixcomwd.c b/drivers/char/mixcomwd.c
index 6352d6f73..1daff0de7 100644
--- a/drivers/char/mixcomwd.c
+++ b/drivers/char/mixcomwd.c
@@ -43,6 +43,7 @@
#include <linux/watchdog.h>
#include <linux/reboot.h>
#include <linux/init.h>
+#include <linux/smp_lock.h>
#include <asm/uaccess.h>
#include <asm/io.h>
@@ -100,9 +101,11 @@ static int mixcomwd_open(struct inode *inode, struct file *file)
static int mixcomwd_release(struct inode *inode, struct file *file)
{
+ lock_kernel();
#ifndef CONFIG_WATCHDOG_NOWAYOUT
if(mixcomwd_timer_alive) {
printk(KERN_ERR "mixcomwd: release called while internal timer alive");
+ unlock_kernel();
return -EBUSY;
}
init_timer(&mixcomwd_timer);
@@ -114,6 +117,7 @@ static int mixcomwd_release(struct inode *inode, struct file *file)
#endif
clear_bit(0,&mixcomwd_opened);
+ unlock_kernel();
return 0;
}