Skip to content

Commit

Permalink
acpi-thermal: fix mod_timer() interval
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed Apr 24, 2007
1 parent c959df9 commit 94e22e1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/acpi/thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 94e22e1

Please sign in to comment.