watchdog: jz4740: Avoid starting watchdog in set_timeout
authorPaul Cercueil <paul@crapouillou.net>
Fri, 7 Jun 2019 16:24:27 +0000 (18:24 +0200)
committerWim Van Sebroeck <wim@linux-watchdog.org>
Mon, 8 Jul 2019 14:10:11 +0000 (16:10 +0200)
commit9b3461188e86f19113f57a71c8873fab6ca95f36
treeeb2f091e8972b123ccd343958c59b577a1fcd0d0
parentdf04cce3b8f9124fbb201edde84b591fd38d2169
watchdog: jz4740: Avoid starting watchdog in set_timeout

Previously the jz4740_wdt_set_timeout() function was starting the timer
unconditionally, even if it was stopped when that function was entered.

Now, the timer will be restarted only if it was already running before
this function is called.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
drivers/watchdog/jz4740_wdt.c