]> git.hungrycats.org Git - linux/commitdiff
[PATCH] fix all the other watchdogs Dave's changes broke the same
authorAlan Cox <alan@lxorguk.ukuu.org.uk>
Fri, 21 Mar 2003 10:20:52 +0000 (02:20 -0800)
committerLinus Torvalds <torvalds@home.transmeta.com>
Fri, 21 Mar 2003 10:20:52 +0000 (02:20 -0800)
drivers/char/watchdog/ib700wdt.c
drivers/char/watchdog/indydog.c
drivers/char/watchdog/machzwd.c
drivers/char/watchdog/mixcomwd.c
drivers/char/watchdog/pcwd.c
drivers/char/watchdog/sbc60xxwdt.c
drivers/char/watchdog/sc520_wdt.c
drivers/char/watchdog/shwdt.c
drivers/char/watchdog/softdog.c
drivers/char/watchdog/wdt977.c
drivers/char/watchdog/wdt_pci.c

index 7bde8f77a5a9758b0081792242fd263cb9f27bea..5a61d0bf3c4e0dcfdab8b184fe42444af2ca1508 100644 (file)
@@ -228,6 +228,8 @@ ibwdt_open(struct inode *inode, struct file *file)
                        spin_unlock(&ibwdt_lock);
                        return -EBUSY;
                }
+               if (nowayout)
+                       MOD_INC_USE_COUNT;
 
                /* Activate */
                ibwdt_is_open = 1;
index 51a01f85539d3c1ea93f9fcaa2a042a43820042b..23697570bcdb4d5086e27e50d18391b981bfd84a 100644 (file)
@@ -53,6 +53,9 @@ 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
         */
index e46b736b648f0b5a01671c6b7edc95a982c4941c..da868c671eefe589513d4127fad29e8b08334754 100644 (file)
@@ -390,6 +390,9 @@ 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);
index 1dd8ad18d78a64027170a5d2e8c5b7e875e5489d..e207ef305c2c62de54a1212c52755843a6ccebbf 100644 (file)
@@ -93,7 +93,9 @@ static int mixcomwd_open(struct inode *inode, struct file *file)
        }
        mixcomwd_ping();
        
-       if (!nowayout) {
+       if (nowayout) {
+               MOD_INC_USE_COUNT;
+       } else {
                if(mixcomwd_timer_alive) {
                        del_timer(&mixcomwd_timer);
                        mixcomwd_timer_alive=0;
index c77dec271e50a6afba96a33c5955711c5b4ed978..865e28358d8c237f0d0b10a549efea9a30219afa 100644 (file)
@@ -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);
index 93ad6ea4d648371c4c5a25aca40ccd8ae1dbe2d3..5419394c236d448817abf1013e0bdda6f65ed26e 100644 (file)
@@ -206,7 +206,9 @@ 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();
index 9a7b622b73bc521e4aff15c87b482c1782a25ec1..c58863427b94167689c381272d053b0c358fe2db 100644 (file)
@@ -229,6 +229,8 @@ 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:
index 47fe766de575cdc4d033e9ea03a9cc4a88e4798f..9e6713f6e803fa042142720f9b5d18e08f56622a 100644 (file)
@@ -189,6 +189,10 @@ 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;
index b97acee1e32b668a88c344437682d223107d745e..658414d74ee7810639d16145896272c653c8cef1 100644 (file)
@@ -103,7 +103,9 @@ 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
         */
index 6597ae73c461fd2e1a867c964c0a42c969ce454d..80a4a7daebb6534356f52fe730c1a8a9b2110be1 100644 (file)
@@ -99,6 +99,8 @@ 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;
        }
index 0509e9d7144487b311d7bf989aa3d73384f9ded7..dde9f8e54973630c163a7e4a935f10f94944eaea 100644 (file)
@@ -365,6 +365,9 @@ static int wdtpci_open(struct inode *inode, struct file *file)
                        if (down_trylock(&open_sem))
                                return -EBUSY;
 
+                       if (nowayout) {
+                               MOD_INC_USE_COUNT;
+                       }
                        /*
                         *      Activate 
                         */