diff options
author | Julia Lawall <julia@diku.dk> | 2008-04-17 15:28:25 +0200 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2008-04-24 19:24:54 +0200 |
commit | b39b04403bba4f807ee6e57ae2f4407187588fcd (patch) | |
tree | c2f0eb400957c679e57f9a43cd6109aafa1fbb73 /drivers/char/keyboard.c | |
parent | Input: fix ordering in joystick Makefile (diff) | |
download | linux-b39b04403bba4f807ee6e57ae2f4407187588fcd.tar.xz linux-b39b04403bba4f807ee6e57ae2f4407187588fcd.zip |
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@diku.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/char/keyboard.c')
-rw-r--r-- | 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 59608e341385..45806d27579a 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; } |