mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 19:07:52 +00:00
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>
This commit is contained in:
parent
c838a3ae61
commit
0a48f239bf
1 changed files with 1 additions and 1 deletions
|
@ -287,7 +287,7 @@ static unsigned int wdat_wdt_get_timeleft(struct watchdog_device *wdd)
|
||||||
struct wdat_wdt *wdat = to_wdat_wdt(wdd);
|
struct wdat_wdt *wdat = to_wdat_wdt(wdd);
|
||||||
u32 periods = 0;
|
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;
|
return periods * wdat->period / 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue