From: Andy Shevchenko Date: Fri, 18 Nov 2016 14:50:02 +0000 (+0200) Subject: intel-mid_wdt: make sure watchdog is not running at startup X-Git-Tag: v4.10-rc1~10^2~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=31ecad65b011d64dfc80cab7c968078171aa2642;p=thirdparty%2Fkernel%2Flinux.git intel-mid_wdt: make sure watchdog is not running at startup Make sure that the watchdog is not running after loading and before it is started by opening /dev/watchdog. Signed-off-by: Andy Shevchenko Reviewed-by: Guenter Roeck Signed-off-by: Guenter Roeck --- diff --git a/drivers/watchdog/intel-mid_wdt.c b/drivers/watchdog/intel-mid_wdt.c index db36d12e2b523..ff099a36d0c8c 100644 --- a/drivers/watchdog/intel-mid_wdt.c +++ b/drivers/watchdog/intel-mid_wdt.c @@ -151,6 +151,9 @@ static int mid_wdt_probe(struct platform_device *pdev) return ret; } + /* Make sure the watchdog is not running */ + wdt_stop(wdt_dev); + ret = watchdog_register_device(wdt_dev); if (ret) { dev_err(&pdev->dev, "error registering watchdog device\n");