Many drivers implements the exact same piece of code to register a reboot notifier. It can be nice to factorize this in the watchdog core. The first patch adds a new helper function, watchdog_stop_on_reboot, which registers a reboot notifier block for this device. If used, the watchdog core will care about stopping the watchdog when receiving a reboot notification. The following patches bring this change to the current watchdog drivers that use watchdog_core. This action is done only when the reboot code is SYS_HALT or SYS_DOWN, since that is what most of the drivers are doing. Only 3 drivers, including gpio_wdt, stop the watchdog on SYS_POWER_OFF. So gpio_wdt is the only driver whose behaviour is affected by this patchset. This change has been compile-tested with allyesconfig on arm. It has been tested with (not mainlined yet) ts-4800's watchdog driver. Damien Riegel (7): watchdog: core: add reboot notifier support watchdog: bcm47xx_wdt: use core reboot notifier watchdog: cadence_wdt: use core reboot notifier watchdog: gpio_wdt: stop on SYS_DOWN instead of SYS_POWER_OFF watchdog: gpio_wdt: use core reboot notifier watchdog: softdog: use core reboot notifier watchdog: w83627hf_wdt: use core reboot notifier Documentation/watchdog/watchdog-kernel-api.txt | 8 ++++++ drivers/watchdog/bcm47xx_wdt.c | 24 ++--------------- drivers/watchdog/cadence_wdt.c | 36 +------------------------- drivers/watchdog/gpio_wdt.c | 35 ++----------------------- drivers/watchdog/softdog.c | 30 ++------------------- drivers/watchdog/w83627hf_wdt.c | 32 ++--------------------- drivers/watchdog/watchdog_core.c | 35 +++++++++++++++++++++++++ include/linux/bcm47xx_wdt.h | 2 -- include/linux/watchdog.h | 9 +++++++ 9 files changed, 61 insertions(+), 150 deletions(-) -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html