diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-07-15 03:32:22 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-07-15 03:32:22 +0000 |
commit | f1da2c3860e301527d56a1ef0b56c649ee7c4b1b (patch) | |
tree | 562b5d2e8b9cb62eb983d78ff6bcf9789e08fcf6 /drivers/char/wdt285.c | |
parent | 00f11569ac8ca73cbcdef8822de1583e79aee571 (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/wdt285.c')
-rw-r--r-- | drivers/char/wdt285.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/char/wdt285.c b/drivers/char/wdt285.c index 6efdd7f76..66633fd20 100644 --- a/drivers/char/wdt285.c +++ b/drivers/char/wdt285.c @@ -26,6 +26,7 @@ #include <linux/reboot.h> #include <linux/init.h> #include <linux/interrupt.h> +#include <linux/smp_lock.h> #include <asm/irq.h> #include <asm/uaccess.h> @@ -74,7 +75,6 @@ static int watchdog_open(struct inode *inode, struct file *file) { if(timer_alive) return -EBUSY; - MOD_INC_USE_COUNT; /* * Ahead watchdog factor ten, Mr Sulu */ @@ -86,6 +86,7 @@ static int watchdog_open(struct inode *inode, struct file *file) request_irq(IRQ_TIMER4, watchdog_fire, 0, "watchdog", NULL); #else *CSR_SA110_CNTL |= 1 << 13; + MOD_INC_USE_COUNT; #endif timer_alive = 1; return 0; @@ -94,9 +95,10 @@ static int watchdog_open(struct inode *inode, struct file *file) static int watchdog_release(struct inode *inode, struct file *file) { #ifdef ONLY_TESTING + lock_kernel(); free_irq(IRQ_TIMER4, NULL); timer_alive = 0; - MOD_DEC_USE_COUNT; + unlock_kernel(); #else /* * It's irreversible! @@ -153,6 +155,7 @@ static int watchdog_ioctl(struct inode *inode, struct file *file, static struct file_operations watchdog_fops= { + owner: THIS_MODULE, write: watchdog_write, ioctl: watchdog_ioctl, open: watchdog_open, |