提交 146ea835 编写于 作者: E Esra Altintas 提交者: Greg Kroah-Hartman

staging: speakup: Use time_after_eq to compare jiffies in speakup_keypc.c

The following patch fixes the checkpatch.pl warning:
WARNING: Comparing jiffies is almost always wrong; prefer time_after,
time_before and friends
Signed-off-by: NEsra Altintas <es.altintas@gmail.com>
Reviewed-by: NJosh Triplett <josh@joshtriplett.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 ad96f37f
......@@ -229,7 +229,7 @@ spin_lock_irqsave(&speakup_info.spinlock, flags);
ch = PROCSPEECH;
outb_p(ch, synth_port);
SWAIT;
if ((jiffies >= jiff_max) && (ch == SPACE)) {
if (time_after_eq(jiffies, jiff_max) && (ch == SPACE)) {
timeout = 1000;
while (synth_writable())
if (--timeout <= 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册