Commit bb51bc59 authored by Li Shaohua's avatar Li Shaohua Committed by Linus Torvalds

[PATCH] time runx too fast after S3

After resume from S3, 'date' shows time run too fast.
Signed-off-by: default avatarLi Shaohua <shaohua.li@intel.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 90b8f3ac
......@@ -342,12 +342,13 @@ static int timer_resume(struct sys_device *dev)
hpet_reenable();
#endif
sec = get_cmos_time() + clock_cmos_diff;
sleep_length = get_cmos_time() - sleep_start;
sleep_length = (get_cmos_time() - sleep_start) * HZ;
write_seqlock_irqsave(&xtime_lock, flags);
xtime.tv_sec = sec;
xtime.tv_nsec = 0;
write_sequnlock_irqrestore(&xtime_lock, flags);
jiffies += sleep_length * HZ;
jiffies += sleep_length;
wall_jiffies += sleep_length;
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment