mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
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>
This commit is contained in:
committed by
Wim Van Sebroeck
parent
09a46e7397
commit
257f8c4aae
@@ -128,6 +128,12 @@ struct watchdog_device {
|
||||
#define WATCHDOG_NOWAYOUT_INIT_STATUS 0
|
||||
#endif
|
||||
|
||||
/* Use the following function to check wether or not the watchdog is active */
|
||||
static inline bool watchdog_active(struct watchdog_device *wdd)
|
||||
{
|
||||
return test_bit(WDOG_ACTIVE, &wdd->status);
|
||||
}
|
||||
|
||||
/* Use the following function to set the nowayout feature */
|
||||
static inline void watchdog_set_nowayout(struct watchdog_device *wdd, bool nowayout)
|
||||
{
|
||||
|
Reference in New Issue
Block a user