wdt:lpc32xx:Fix no-wayout on close
authorSundar Andithevar <sundarapandian.andithevar@nxp.com>
Thu, 19 Jan 2012 16:19:20 +0000 (16:19 +0000)
committerBangaragiri G <bangaragiri.g@nxp.com>
Thu, 19 Jan 2012 16:19:20 +0000 (16:19 +0000)
The PNX4008/LPC32XX WDT driver should not disable
the watchdog on close when nowayout has been set
for the module

Signed-off-by: Bangaragiri G <bangaragiri.g@nxp.com>

drivers/watchdog/pnx4008_wdt.c

index bf5b97c..b1c91a7 100644 (file)
@@ -228,6 +228,10 @@ static int pnx4008_wdt_release(struct inode *inode, struct file *file)
        if (!test_bit(WDT_OK_TO_CLOSE, &wdt_status))
                printk(KERN_WARNING "WATCHDOG: Device closed unexpectdly\n");
 
+       /* We should not disable watchdog if nowayout is set */
+       if (nowayout)
+               return 0;
+
        wdt_disable();
        clk_disable(wdt_clk);
        clear_bit(WDT_IN_USE, &wdt_status);