diff options
author | Viresh Kumar <viresh.kumar@st.com> | 2012-03-12 00:21:56 -0400 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2012-05-30 01:53:46 -0400 |
commit | 257f8c4aae392654d4ab846030b9f4518f16ed32 (patch) | |
tree | 54b97861301fa1097126f9d6d42633e835adff72 /include | |
parent | 09a46e739780aab2eadf47afdefa70c9cd69d83d (diff) |
watchdog: Add watchdog_active() routine
Some watchdog may need to check if watchdog is ACTIVE or not, for example in
their suspend/resume hooks.
This patch adds this routine and changes the core drivers to use it.
Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/watchdog.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/watchdog.h b/include/linux/watchdog.h index ac40716b44e9..1984ea610577 100644 --- a/include/linux/watchdog.h +++ b/include/linux/watchdog.h | |||
@@ -128,6 +128,12 @@ struct watchdog_device { | |||
128 | #define WATCHDOG_NOWAYOUT_INIT_STATUS 0 | 128 | #define WATCHDOG_NOWAYOUT_INIT_STATUS 0 |
129 | #endif | 129 | #endif |
130 | 130 | ||
131 | /* Use the following function to check wether or not the watchdog is active */ | ||
132 | static inline bool watchdog_active(struct watchdog_device *wdd) | ||
133 | { | ||
134 | return test_bit(WDOG_ACTIVE, &wdd->status); | ||
135 | } | ||
136 | |||
131 | /* Use the following function to set the nowayout feature */ | 137 | /* Use the following function to set the nowayout feature */ |
132 | static inline void watchdog_set_nowayout(struct watchdog_device *wdd, bool nowayout) | 138 | static inline void watchdog_set_nowayout(struct watchdog_device *wdd, bool nowayout) |
133 | { | 139 | { |