watchdog: wdat_wdt: Avoid unimplemented get_timeleft
authorThomas Weißschuh <linux@weissschuh.net>
Thu, 22 Dec 2022 23:43:31 +0000 (23:43 +0000)
committerWim Van Sebroeck <wim@linux-watchdog.org>
Sun, 12 Feb 2023 14:32:53 +0000 (15:32 +0100)
commit00bdbc9a860152cafc0bcfa4fc70f38401101ebc
treea56938a78ca6fbc7295610837b8663c3340a3690
parent98b7a1613011d9d5ec76841a2a5a689c3010d1f3
watchdog: wdat_wdt: Avoid unimplemented get_timeleft

As per the specification the action QUERY_COUNTDOWN_PERIOD is optional.
If the action is not implemented by the physical device the driver would
always report "0" from get_timeleft().
Avoid confusing userspace by only providing get_timeleft() when
implemented by the hardware.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20221221-wdat_wdt-timeleft-v1-1-8e8a314c36cc@weissschuh.net
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
drivers/watchdog/wdat_wdt.c