watchdog: permit `wd 0` for non-stoppable, but inactive, watchdogs
A watchdog that can't be stopped returns -ENOSYS on set_timeout(0).
If the watchdog supports communicating whether it's running, we could
still allow `wd 0`, if it hasn't been started yet.

Setting device parameter .priority=0 disables a watchdog. One would
expect this to always succeed for a not-running watchdog, but currently
it doesn't, if the driver's set_timeout(0) returns -ENOSYS. With this
fix, this is supported making the user API less surprising.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 70a550c commit 0b944fce55f4750000a6a0df477034a9e4971b6f
@Ahmad Fatoum Ahmad Fatoum authored on 22 Jun 2020
Sascha Hauer committed on 23 Jun 2020
Showing 1 changed file
View
drivers/watchdog/wd_core.c