Linux-Watchdog Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v1] watchdog: intel-mid_wdt: Add WATCHDOG_NOWAYOUT support
@ 2019-09-24 14:31 Andy Shevchenko
  2019-09-30 13:15 ` Guenter Roeck
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Andy Shevchenko @ 2019-09-24 14:31 UTC (permalink / raw)
  To: Razvan Becheriu, linux-watchdog, Wim Van Sebroeck, Guenter Roeck
  Cc: Andy Shevchenko, Ferry Toth

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 <razvan.becheriu@qualitance.com>
Cc: Ferry Toth <fntoth@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/watchdog/intel-mid_wdt.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/watchdog/intel-mid_wdt.c b/drivers/watchdog/intel-mid_wdt.c
index 2cdbd37c700c..470213abfd3d 100644
--- a/drivers/watchdog/intel-mid_wdt.c
+++ b/drivers/watchdog/intel-mid_wdt.c
@@ -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,
-- 
2.23.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, back to index

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-24 14:31 [PATCH v1] watchdog: intel-mid_wdt: Add WATCHDOG_NOWAYOUT support Andy Shevchenko
2019-09-30 13:15 ` Guenter Roeck
2019-10-29 17:42   ` Ferry Toth
2019-10-30  0:13     ` Guenter Roeck
     [not found] ` <CAJAoKi8aRHyySUM1mcuub_tgmE7fdLgRyajYF=fUf6QH0PvZPA@mail.gmail.com>
2019-10-01 20:32   ` Andy Shevchenko
     [not found] ` <CAJAoKi_c2XRi_tdJcc3MMS1=9d4WH_Tq9EmH30-GyXcPoJhXGA@mail.gmail.com>
2019-10-02  6:11   ` razvan becheriu
2019-10-02  8:31     ` Andy Shevchenko

Linux-Watchdog Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-watchdog/0 linux-watchdog/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-watchdog linux-watchdog/ https://lore.kernel.org/linux-watchdog \
		linux-watchdog@vger.kernel.org
	public-inbox-index linux-watchdog

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-watchdog


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git