On 11/18/2016 06:50 AM, Andy Shevchenko wrote:
Make sure that the watchdog is not running after loading and before it is started by opening /dev/watchdog. Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> --- drivers/watchdog/intel-mid_wdt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/watchdog/intel-mid_wdt.c b/drivers/watchdog/intel-mid_wdt.c index db36d12..ff099a3 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");
This leaves the system exposed. Why not just tell the core if the watchdog is running and let it handle the ping until the device is opened ? Is it not possible to detect if the watchdog is running ? Guenter -- To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html