diff options
author | Jean-Baptiste Theou <jtheou@adeneo-embedded.us> | 2015-06-09 12:55:02 -0400 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2015-06-29 05:51:06 -0400 |
commit | ef90174f821041313d42d99c1c8b35a3af64a910 (patch) | |
tree | 0265d89b6ee866b7e20a8925fae03e290e078e00 /include/linux/watchdog.h | |
parent | b9be9660ba2d23259e4a430a44167ef441dc5fe6 (diff) |
watchdog: watchdog_core: Add watchdog registration deferral mechanism
Currently, watchdog subsystem require the misc subsystem to
register a watchdog. This may not be the case in case of an
early registration of a watchdog, which can be required when
the watchdog cannot be disabled.
This patch introduces a deferral mechanism to remove this requirement.
Signed-off-by: Jean-Baptiste Theou <jtheou@adeneo-embedded.us>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'include/linux/watchdog.h')
-rw-r--r-- | include/linux/watchdog.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/watchdog.h b/include/linux/watchdog.h index a746bf5216f8..f47feada5b42 100644 --- a/include/linux/watchdog.h +++ b/include/linux/watchdog.h | |||
@@ -65,6 +65,8 @@ struct watchdog_ops { | |||
65 | * @driver-data:Pointer to the drivers private data. | 65 | * @driver-data:Pointer to the drivers private data. |
66 | * @lock: Lock for watchdog core internal use only. | 66 | * @lock: Lock for watchdog core internal use only. |
67 | * @status: Field that contains the devices internal status bits. | 67 | * @status: Field that contains the devices internal status bits. |
68 | * @deferred: entry in wtd_deferred_reg_list which is used to | ||
69 | * register early initialized watchdogs. | ||
68 | * | 70 | * |
69 | * The watchdog_device structure contains all information about a | 71 | * The watchdog_device structure contains all information about a |
70 | * watchdog timer device. | 72 | * watchdog timer device. |
@@ -95,6 +97,7 @@ struct watchdog_device { | |||
95 | #define WDOG_ALLOW_RELEASE 2 /* Did we receive the magic char ? */ | 97 | #define WDOG_ALLOW_RELEASE 2 /* Did we receive the magic char ? */ |
96 | #define WDOG_NO_WAY_OUT 3 /* Is 'nowayout' feature set ? */ | 98 | #define WDOG_NO_WAY_OUT 3 /* Is 'nowayout' feature set ? */ |
97 | #define WDOG_UNREGISTERED 4 /* Has the device been unregistered */ | 99 | #define WDOG_UNREGISTERED 4 /* Has the device been unregistered */ |
100 | struct list_head deferred; | ||
98 | }; | 101 | }; |
99 | 102 | ||
100 | #define WATCHDOG_NOWAYOUT IS_BUILTIN(CONFIG_WATCHDOG_NOWAYOUT) | 103 | #define WATCHDOG_NOWAYOUT IS_BUILTIN(CONFIG_WATCHDOG_NOWAYOUT) |