watchdog: intel-mid_wdt: Add WATCHDOG_NOWAYOUT support

Normally, the watchdog is disabled when /dev/watchdog is closed, but if
CONFIG_WATCHDOG_NOWAYOUT is defined, then it means that the watchdog should
remain enabled. So we should keep it enabled if CONFIG_WATCHDOG_NOWAYOUT
is defined.

Reported-by: Razvan Becheriu <[email protected]>
Cc: Ferry Toth <[email protected]>
Signed-off-by: Andy Shevchenko <[email protected]>
Reviewed-by: Guenter Roeck <[email protected]>
Tested-by: Razvan Becheriu <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Guenter Roeck <[email protected]>
Signed-off-by: Wim Van Sebroeck <[email protected]>
This commit is contained in:
Andy Shevchenko
2019-11-18 19:53:39 +01:00
committed by Wim Van Sebroeck
parent 86865322d2
commit ff0aaacb6f
+1
View File
@@ -134,6 +134,7 @@ static int mid_wdt_probe(struct platform_device *pdev)
wdt_dev->timeout = MID_WDT_DEFAULT_TIMEOUT;
wdt_dev->parent = dev;
watchdog_set_nowayout(wdt_dev, WATCHDOG_NOWAYOUT);
watchdog_set_drvdata(wdt_dev, dev);
ret = devm_request_irq(dev, pdata->irq, mid_wdt_irq,