|
@@ -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;
|