patch-2.4.0-test4 linux/drivers/char/wdt285.c
Next file: linux/drivers/char/wdt977.c
Previous file: linux/drivers/char/wdt.c
Back to the patch index
Back to the overall index
- Lines: 44
- Date:
Wed Jul 12 21:58:42 2000
- Orig file:
v2.4.0-test3/linux/drivers/char/wdt285.c
- Orig date:
Thu Mar 2 14:36:22 2000
diff -u --recursive --new-file v2.4.0-test3/linux/drivers/char/wdt285.c linux/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 @@
{
if(timer_alive)
return -EBUSY;
- MOD_INC_USE_COUNT;
/*
* Ahead watchdog factor ten, Mr Sulu
*/
@@ -86,6 +86,7 @@
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_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 struct file_operations watchdog_fops=
{
+ owner: THIS_MODULE,
write: watchdog_write,
ioctl: watchdog_ioctl,
open: watchdog_open,
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)