watchdog: use __watchdog_ping in startup
authorTero Kristo <t-kristo@ti.com>
Fri, 17 Jul 2020 13:29:55 +0000 (16:29 +0300)
committerWim Van Sebroeck <wim@linux-watchdog.org>
Wed, 5 Aug 2020 16:43:02 +0000 (18:43 +0200)
commitfbbe35dfcf949f4d6cf987648e52a85fc0c2a23a
treedb0974b58cb86cd949582d764ccbc7df293a6a2b
parent36a8947c6b5423b2fb867a7af87ae40eb12f4123
watchdog: use __watchdog_ping in startup

Current watchdog startup functionality does not respect the minimum hw
heartbeat setup and the last watchdog ping timeframe when watchdog is
already running and userspace process attaches to it. Fix this by using
the __watchdog_ping from the startup also. For this code path, we can
also let the __watchdog_ping handle the bookkeeping for the worker and
last keepalive times.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20200717132958.14304-2-t-kristo@ti.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
drivers/watchdog/watchdog_dev.c