mirror of https://gitee.com/openkylin/linux.git
acpi-thermal: fix mod_timer() interval
Use relative time, not absolute. Discovered by Jung-Ik (John) Lee <jilee@google.com>. Cc: Jung-Ik (John) Lee <jilee@google.com> Acked-by: Len Brown <lenb@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
c959df9f01
commit
94e22e13ad
|
@ -758,7 +758,8 @@ static void acpi_thermal_check(void *data)
|
|||
del_timer(&(tz->timer));
|
||||
} else {
|
||||
if (timer_pending(&(tz->timer)))
|
||||
mod_timer(&(tz->timer), (HZ * sleep_time) / 1000);
|
||||
mod_timer(&(tz->timer),
|
||||
jiffies + (HZ * sleep_time) / 1000);
|
||||
else {
|
||||
tz->timer.data = (unsigned long)tz;
|
||||
tz->timer.function = acpi_thermal_run;
|
||||
|
|
Loading…
Reference in New Issue