When there is no sysfs at all for the watchdog, fall back to reading
from the device node.
This is also useful if the legacy compat /dev/watchdog device which
never has a sysfs interface.
Closes: #3073
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
(cherry picked from commit
8bd4d796f4d6a0480c0744302ca40fa5ad5de070)
static bool should_read_from_device(struct wd_device *wd)
{
+ if (wd->no_sysfs)
+ return true;
+
if (!wd->has_nowayout)
return false;