diff options
author | Viresh Kumar <viresh.kumar@st.com> | 2012-03-12 09:51:56 +0530 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2012-05-30 07:53:46 +0200 |
commit | 257f8c4aae392654d4ab846030b9f4518f16ed32 (patch) | |
tree | 54b97861301fa1097126f9d6d42633e835adff72 /drivers/watchdog/watchdog_dev.c | |
parent | 09a46e739780aab2eadf47afdefa70c9cd69d83d (diff) | |
download | op-kernel-dev-257f8c4aae392654d4ab846030b9f4518f16ed32.zip op-kernel-dev-257f8c4aae392654d4ab846030b9f4518f16ed32.tar.gz |
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 'drivers/watchdog/watchdog_dev.c')
-rw-r--r-- | drivers/watchdog/watchdog_dev.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/watchdog/watchdog_dev.c b/drivers/watchdog/watchdog_dev.c index 6c18a58..930cc7c 100644 --- a/drivers/watchdog/watchdog_dev.c +++ b/drivers/watchdog/watchdog_dev.c @@ -61,7 +61,7 @@ static struct watchdog_device *wdd; static int watchdog_ping(struct watchdog_device *wddev) { - if (test_bit(WDOG_ACTIVE, &wddev->status)) { + if (watchdog_active(wddev)) { if (wddev->ops->ping) return wddev->ops->ping(wddev); /* ping the watchdog */ else @@ -83,7 +83,7 @@ static int watchdog_start(struct watchdog_device *wddev) { int err; - if (!test_bit(WDOG_ACTIVE, &wddev->status)) { + if (!watchdog_active(wddev)) { err = wddev->ops->start(wddev); if (err < 0) return err; @@ -113,7 +113,7 @@ static int watchdog_stop(struct watchdog_device *wddev) return err; } - if (test_bit(WDOG_ACTIVE, &wddev->status)) { + if (watchdog_active(wddev)) { err = wddev->ops->stop(wddev); if (err < 0) return err; |