Message ID | 1428357491-15608-1-git-send-email-kamal@canonical.com |
---|---|
State | New |
Headers | show |
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index da7d0a2..84b7f1d 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c @@ -996,8 +996,8 @@ EXPORT_SYMBOL(start_tty); /* We limit tty time update visibility to every 8 seconds or so. */ static void tty_update_time(struct timespec *time) { - unsigned long sec = get_seconds() & ~7; - if ((long)(sec - time->tv_sec) > 0) + unsigned long sec = get_seconds(); + if (abs(sec - time->tv_sec) & ~7) time->tv_sec = sec; }