aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/wdat_wdt.c
diff options
context:
space:
mode:
authorBryan Tan <bryantan@vmware.com>2019-04-10 12:49:33 +0000
committerWim Van Sebroeck <wim@linux-watchdog.org>2019-05-05 21:02:30 +0200
commit0a48f239bfce525f4b7de0952aadce89ac2c2689 (patch)
tree720c987a9477aeba4ce63097204d999310530dba /drivers/watchdog/wdat_wdt.c
parentwatchdog: tangox_wdt: Convert to use device managed functions and other improvements (diff)
downloadlinux-dev-0a48f239bfce525f4b7de0952aadce89ac2c2689.tar.xz
linux-dev-0a48f239bfce525f4b7de0952aadce89ac2c2689.zip
watchdog: wdat_wdt: fix get_timeleft call for wdat_wdt
The get_timeleft call for wdat_wdt was using ACPI_WDAT_GET_COUNTDOWN when running an action on the device, which would return the configured countdown, instead of ACPI_WDAT_GET_CURRENT_COUNTDOWN, which returns the time left before the watchdog will fire. This change corrects that. Signed-off-by: Bryan Tan <bryantan@vmware.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
Diffstat (limited to 'drivers/watchdog/wdat_wdt.c')
-rw-r--r--drivers/watchdog/wdat_wdt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/watchdog/wdat_wdt.c b/drivers/watchdog/wdat_wdt.c
index 56ad19608a9b..387892fe63b4 100644
--- a/drivers/watchdog/wdat_wdt.c
+++ b/drivers/watchdog/wdat_wdt.c
@@ -287,7 +287,7 @@ static unsigned int wdat_wdt_get_timeleft(struct watchdog_device *wdd)
struct wdat_wdt *wdat = to_wdat_wdt(wdd);
u32 periods = 0;
- wdat_wdt_run_action(wdat, ACPI_WDAT_GET_COUNTDOWN, 0, &periods);
+ wdat_wdt_run_action(wdat, ACPI_WDAT_GET_CURRENT_COUNTDOWN, 0, &periods);
return periods * wdat->period / 1000;
}