staging: speakup: remove jiffies comparison using time_after_eq() in speakup_dtlk.c
authorEsra Altintas <es.altintas@gmail.com>
Tue, 7 Oct 2014 19:45:55 +0000 (22:45 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Oct 2014 02:29:12 +0000 (10:29 +0800)
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>
drivers/staging/speakup/speakup_dtlk.c

index d7d5152738967674f184fcbcc39a49454703220b..4e059ea78d4c97d9cf65570431ea512eac64919e 100644 (file)
@@ -231,7 +231,7 @@ static void do_catch_up(struct spk_synth *synth)
                if (ch == '\n')
                        ch = PROCSPEECH;
                spk_out(ch);
-               if ((jiffies >= jiff_max) && (ch == SPACE)) {
+               if (time_after_eq(jiffies, jiff_max) && (ch == SPACE)) {
                        spk_out(PROCSPEECH);
                        spin_lock_irqsave(&speakup_info.spinlock, flags);
                        delay_time_val = delay_time->u.n.value;