From 146ea83566881aecb68dbf15e30a1c945116d1c4 Mon Sep 17 00:00:00 2001 From: Esra Altintas Date: Wed, 8 Oct 2014 14:32:10 +0300 Subject: [PATCH] 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 Reviewed-by: Josh Triplett Signed-off-by: Greg Kroah-Hartman --- drivers/staging/speakup/speakup_keypc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/speakup/speakup_keypc.c b/drivers/staging/speakup/speakup_keypc.c index 4ed3889..cef20fd 100644 --- a/drivers/staging/speakup/speakup_keypc.c +++ b/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) -- 2.7.4