ARM: LPC313X: Fix WATCHDOG_NOWAYOUT feature. If CONFIG_WATCHDOG_NOWAYOUT is set,...
authorSrinivas Bakki <srinivas.bakki@nxp.com>
Mon, 7 Feb 2011 10:14:19 +0000 (15:14 +0530)
committerSrinivas Bakki <srinivas.bakki@nxp.com>
Mon, 7 Feb 2011 10:14:19 +0000 (15:14 +0530)
Signed-off-by: Daniel Widyanto <daniel.widyanto@nxp.com>

drivers/watchdog/wdt_lpc313x.c

index 261c62a..024063f 100644 (file)
@@ -236,7 +236,10 @@ static int lpc313x_wdt_release(struct inode *inode, struct file *file)
        if (!test_bit(WDT_OK_TO_CLOSE, &wdt->status))
                dev_warn(wdt->dev, "Watchdog timer closed unexpectedly\n");
 
-       lpc313x_wdt_stop(wdt);
+       if (!nowayout) {
+               lpc313x_wdt_stop(wdt);
+       }
+
        clear_bit(WDT_IN_USE, &wdt->status);
        clear_bit(WDT_OK_TO_CLOSE, &wdt->status);