From: Esra Altintas Date: Wed, 8 Oct 2014 11:32:10 +0000 (+0300) Subject: staging: speakup: Use time_after_eq to compare jiffies in speakup_keypc.c X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=146ea83566881aecb68dbf15e30a1c945116d1c4;p=linux-beck.git 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 --- diff --git a/drivers/staging/speakup/speakup_keypc.c b/drivers/staging/speakup/speakup_keypc.c index 4ed38898a17a..cef20fdda646 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)