diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2016-11-18 09:50:02 -0500 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2016-12-16 09:53:54 -0500 |
commit | 31ecad65b011d64dfc80cab7c968078171aa2642 (patch) | |
tree | 0e8bb4a9b00be734a65b330560328a5540c9936f | |
parent | 9eff1140a82db8c5520f76e51c21827b4af670b3 (diff) |
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 <andriy.shevchenko@linux.intel.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-rw-r--r-- | drivers/watchdog/intel-mid_wdt.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/watchdog/intel-mid_wdt.c b/drivers/watchdog/intel-mid_wdt.c index db36d12e2b52..ff099a36d0c8 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) | |||
151 | return ret; | 151 | return ret; |
152 | } | 152 | } |
153 | 153 | ||
154 | /* Make sure the watchdog is not running */ | ||
155 | wdt_stop(wdt_dev); | ||
156 | |||
154 | ret = watchdog_register_device(wdt_dev); | 157 | ret = watchdog_register_device(wdt_dev); |
155 | if (ret) { | 158 | if (ret) { |
156 | dev_err(&pdev->dev, "error registering watchdog device\n"); | 159 | dev_err(&pdev->dev, "error registering watchdog device\n"); |