[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <2fd746d97fa0452173e06ffd9d0bb376d97bef0b.1208783694.git.dmitry.torokhov@gmail.com>
Date: Thu, 17 Apr 2008 09:28:25 -0400
From: Julia Lawall <dmitry.torokhov@...il.com>
To: unlisted-recipients:; (no To-header on input)
Cc: linux-kernel@...r.kernel.org, jkosina@...e.cz,
akpm@...ux-foundation.org
Subject: [PATCH 33/37] Input: drivers/char/keyboard.c - use time_after
The functions time_before, time_before_eq, time_after, and time_after_eq
are more robust for comparing jiffies against other values.
Signed-off-by: Julia Lawall <julia@...u.dk>
Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
Signed-off-by: Dmitry Torokhov <dtor@...l.ru>
---
drivers/char/keyboard.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/char/keyboard.c b/drivers/char/keyboard.c
index 59608e3..45806d2 100644
--- a/drivers/char/keyboard.c
+++ b/drivers/char/keyboard.c
@@ -42,6 +42,7 @@
#include <linux/input.h>
#include <linux/reboot.h>
#include <linux/notifier.h>
+#include <linux/jiffies.h>
extern void ctrl_alt_del(void);
@@ -928,7 +929,8 @@ static void k_brl(struct vc_data *vc, unsigned char value, char up_flag)
if (up_flag) {
if (brl_timeout) {
if (!committing ||
- jiffies - releasestart > (brl_timeout * HZ) / 1000) {
+ time_after(jiffies,
+ releasestart + msecs_to_jiffies(brl_timeout))) {
committing = pressed;
releasestart = jiffies;
}
--
1.5.5.rc2.6.gf58d
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists