提交 b39b0440 编写于 作者: J Julia Lawall 提交者: Dmitry Torokhov

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: NJulia Lawall <julia@diku.dk>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
上级 81e329cd
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册