aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/tty_io.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty/tty_io.c')
-rw-r--r--drivers/tty/tty_io.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index 51f066aa375e..2bb4dfc02873 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -1028,8 +1028,8 @@ EXPORT_SYMBOL(start_tty);
1028/* We limit tty time update visibility to every 8 seconds or so. */ 1028/* We limit tty time update visibility to every 8 seconds or so. */
1029static void tty_update_time(struct timespec *time) 1029static void tty_update_time(struct timespec *time)
1030{ 1030{
1031 unsigned long sec = get_seconds() & ~7; 1031 unsigned long sec = get_seconds();
1032 if ((long)(sec - time->tv_sec) > 0) 1032 if (abs(sec - time->tv_sec) & ~7)
1033 time->tv_sec = sec; 1033 time->tv_sec = sec;
1034} 1034}
1035 1035