]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
intel-mid_wdt: make sure watchdog is not running at startup
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 18 Nov 2016 14:50:02 +0000 (16:50 +0200)
committerGuenter Roeck <linux@roeck-us.net>
Fri, 16 Dec 2016 14:53:54 +0000 (06:53 -0800)
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@linux.intel.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/watchdog/intel-mid_wdt.c

index db36d12e2b52301da6300514d99e380db669da5d..ff099a36d0c8c7835895311bba3f55a7d5617e2c 100644 (file)
@@ -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");