Commit 0bdb4fe0 authored by Dave Jones's avatar Dave Jones

[WATCHDOG] remove remainder of the old broken module locking scheme

parent 4e71c0ea
......@@ -141,8 +141,6 @@ static int acq_open(struct inode *inode, struct file *file)
spin_unlock(&acq_lock);
return -EBUSY;
}
if (nowayout)
MOD_INC_USE_COUNT;
/* Activate */
acq_is_open=1;
......
......@@ -143,10 +143,6 @@ static int amdtco_fop_open(struct inode *inode, struct file *file)
if (down_trylock(&open_sem))
return -EBUSY;
#ifdef CONFIG_WATCHDOG_NOWAYOUT
MOD_INC_USE_COUNT;
#endif
if (timeout > MAX_TIMEOUT)
timeout = MAX_TIMEOUT;
......
......@@ -53,9 +53,6 @@ static int indydog_open(struct inode *inode, struct file *file)
if( test_and_set_bit(0,&indydog_alive) )
return -EBUSY;
if (nowayout)
MOD_INC_USE_COUNT;
/*
* Activate timer
*/
......
......@@ -390,9 +390,6 @@ static int zf_open(struct inode *inode, struct file *file)
return -EBUSY;
}
if (nowayout)
MOD_INC_USE_COUNT;
zf_is_open = 1;
spin_unlock(&zf_lock);
......
......@@ -93,9 +93,7 @@ static int mixcomwd_open(struct inode *inode, struct file *file)
}
mixcomwd_ping();
if (nowayout) {
MOD_INC_USE_COUNT;
} else {
if (!nowayout) {
if(mixcomwd_timer_alive) {
del_timer(&mixcomwd_timer);
mixcomwd_timer_alive=0;
......
......@@ -430,7 +430,7 @@ static int pcwd_open(struct inode *ino, struct file *filep)
atomic_inc( &open_allowed );
return -EBUSY;
}
MOD_INC_USE_COUNT;
/* Enable the port */
if (revision == PCWD_REVISION_C) {
spin_lock(&io_lock);
......
......@@ -206,9 +206,7 @@ static int fop_open(struct inode * inode, struct file * file)
/* Just in case we're already talking to someone... */
if(wdt_is_open)
return -EBUSY;
if (nowayout) {
MOD_INC_USE_COUNT;
}
/* Good, fire up the show */
wdt_is_open = 1;
wdt_startup();
......
......@@ -229,8 +229,6 @@ static int fop_open(struct inode * inode, struct file * file)
return -EBUSY;
/* Good, fire up the show */
wdt_startup();
if (nowayout)
MOD_INC_USE_COUNT;
return 0;
default:
......
......@@ -189,10 +189,6 @@ static int sh_wdt_open(struct inode *inode, struct file *file)
if (test_and_set_bit(0, &sh_is_open))
return -EBUSY;
if (nowayout) {
MOD_INC_USE_COUNT;
}
sh_wdt_start();
break;
......
......@@ -103,9 +103,7 @@ static int softdog_open(struct inode *inode, struct file *file)
{
if(test_and_set_bit(0, &timer_alive))
return -EBUSY;
if (nowayout) {
MOD_INC_USE_COUNT;
}
/*
* Activate timer
*/
......
......@@ -99,8 +99,6 @@ static int wdt977_open(struct inode *inode, struct file *file)
if (nowayout)
{
MOD_INC_USE_COUNT;
/* do not permit disabling the watchdog by writing 0 to reg. 0xF2 */
if (!timeoutM) timeoutM = DEFAULT_TIMEOUT;
}
......
......@@ -365,9 +365,6 @@ static int wdtpci_open(struct inode *inode, struct file *file)
if (down_trylock(&open_sem))
return -EBUSY;
if (nowayout) {
MOD_INC_USE_COUNT;
}
/*
* Activate
*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment