浏览代码

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: Esra Altintas <es.altintas@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Esra Altintas 11 年之前
父节点
当前提交
146ea83566
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/staging/speakup/speakup_keypc.c

+ 1 - 1
drivers/staging/speakup/speakup_keypc.c

@@ -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)