diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-01-17 23:15:38 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-01-17 23:15:38 +0300 |
commit | 6606b342febfd470b4a33acb73e360eeaca1d9bb (patch) | |
tree | 2414cc2ca582aa34be6e6ed5c830658fbf21db41 /drivers/watchdog/w83627hf_wdt.c | |
parent | a016af2e70bfca23f2f5de7d8708157b86ea374d (diff) | |
parent | ac36856fe4321454b6789c019c96c3ec854094ed (diff) | |
download | linux-6606b342febfd470b4a33acb73e360eeaca1d9bb.tar.xz |
Merge git://www.linux-watchdog.org/linux-watchdog
Pull watchdog updates from Wim Van Sebroeck:
"This adds following items:
- watchdog restart handler support
- watchdog reboot notifier support
- watchdog sysfs attributes
- support for the following new devices: AMD Mullins platform, AMD
Carrizo platform, meson8b SoC, CSRatlas7, TS-4800, Alphascale
asm9260-wdt, Zodiac, Sigma Designs SMP86xx/SMP87xx
- Changes in refcounting for the watchdog core
- watchdog core improvements
- and small fixes"
* git://www.linux-watchdog.org/linux-watchdog: (60 commits)
watchdog: asm9260: remove __init and __exit annotations
watchdog: Drop pointer to watchdog device from struct watchdog_device
watchdog: ziirave: Use watchdog infrastructure to create sysfs attributes
watchdog: Add support for creating driver specific sysfs attributes
watchdog: kill unref/ref ops
watchdog: stmp3xxx: Remove unused variables
watchdog: add MT7621 watchdog support
hwmon: (sch56xx) Drop watchdog driver data reference count callbacks
watchdog: da9055_wdt: Drop reference counting
watchdog: da9052_wdt: Drop reference counting
watchdog: Separate and maintain variables based on variable lifetime
watchdog: diag288: Stop re-using watchdog core internal flags
watchdog: Create watchdog device in watchdog_dev.c
watchdog: qcom-wdt: Do not set 'dev' in struct watchdog_device
watchdog: mena21: Do not use device pointer from struct watchdog_device
watchdog: gpio: Do not use device pointer from struct watchdog_device
watchdog: tangox: Print info message using pointer to platform device
watchdog: bcm2835_wdt: Drop log message if watchdog is stopped
devicetree: watchdog: add binding for Sigma Designs SMP8642 watchdog
watchdog: add support for Sigma Designs SMP86xx/SMP87xx
...
Diffstat (limited to 'drivers/watchdog/w83627hf_wdt.c')
-rw-r--r-- | drivers/watchdog/w83627hf_wdt.c | 32 |
1 files changed, 2 insertions, 30 deletions
diff --git a/drivers/watchdog/w83627hf_wdt.c b/drivers/watchdog/w83627hf_wdt.c index 5824e25eebbb..cab14bc9106c 100644 --- a/drivers/watchdog/w83627hf_wdt.c +++ b/drivers/watchdog/w83627hf_wdt.c @@ -36,8 +36,6 @@ #include <linux/types.h> #include <linux/watchdog.h> #include <linux/ioport.h> -#include <linux/notifier.h> -#include <linux/reboot.h> #include <linux/init.h> #include <linux/io.h> @@ -288,18 +286,6 @@ static unsigned int wdt_get_time(struct watchdog_device *wdog) } /* - * Notifier for system down - */ -static int wdt_notify_sys(struct notifier_block *this, unsigned long code, - void *unused) -{ - if (code == SYS_DOWN || code == SYS_HALT) - wdt_set_time(0); /* Turn the WDT off */ - - return NOTIFY_DONE; -} - -/* * Kernel Interfaces */ @@ -329,10 +315,6 @@ static struct watchdog_device wdt_dev = { * turn the timebomb registers off. */ -static struct notifier_block wdt_notifier = { - .notifier_call = wdt_notify_sys, -}; - static int wdt_find(int addr) { u8 val; @@ -456,6 +438,7 @@ static int __init wdt_init(void) watchdog_init_timeout(&wdt_dev, timeout, NULL); watchdog_set_nowayout(&wdt_dev, nowayout); + watchdog_stop_on_reboot(&wdt_dev); ret = w83627hf_init(&wdt_dev, chip); if (ret) { @@ -463,30 +446,19 @@ static int __init wdt_init(void) return ret; } - ret = register_reboot_notifier(&wdt_notifier); - if (ret != 0) { - pr_err("cannot register reboot notifier (err=%d)\n", ret); - return ret; - } - ret = watchdog_register_device(&wdt_dev); if (ret) - goto unreg_reboot; + return ret; pr_info("initialized. timeout=%d sec (nowayout=%d)\n", wdt_dev.timeout, nowayout); return ret; - -unreg_reboot: - unregister_reboot_notifier(&wdt_notifier); - return ret; } static void __exit wdt_exit(void) { watchdog_unregister_device(&wdt_dev); - unregister_reboot_notifier(&wdt_notifier); } module_init(wdt_init); |