staging: speakup: remove jiffies comparison using time_after_eq()

This patch fixes checkpatch.pl warning in files of speakup
WARNING : Comparing jiffies is almost always wrong; prefer time_after,
time_before and friends

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Tapasweni Pathak 2014-09-21 19:22:51 +05:30 committed by Greg Kroah-Hartman
parent 2e94283b68
commit 89021ecc83
3 changed files with 3 additions and 3 deletions

View File

@ -204,7 +204,7 @@ static void do_catch_up(struct spk_synth *synth)
else if (ch <= SPACE) { else if (ch <= SPACE) {
if (!in_escape && strchr(",.!?;:", last)) if (!in_escape && strchr(",.!?;:", last))
spk_serial_out(PROCSPEECH); spk_serial_out(PROCSPEECH);
if (jiffies >= jiff_max) { if (time_after_eq(jiffies, jiff_max)) {
if (!in_escape) if (!in_escape)
spk_serial_out(PROCSPEECH); spk_serial_out(PROCSPEECH);
spin_lock_irqsave(&speakup_info.spinlock, flags); spin_lock_irqsave(&speakup_info.spinlock, flags);

View File

@ -420,7 +420,7 @@ static void do_catch_up(struct spk_synth *synth)
else if (ch <= SPACE) { else if (ch <= SPACE) {
if (!in_escape && strchr(",.!?;:", last)) if (!in_escape && strchr(",.!?;:", last))
dt_sendchar(PROCSPEECH); dt_sendchar(PROCSPEECH);
if (jiffies >= jiff_max) { if (time_after_eq(jiffies, jiff_max)) {
if (!in_escape) if (!in_escape)
dt_sendchar(PROCSPEECH); dt_sendchar(PROCSPEECH);
spin_lock_irqsave(&speakup_info.spinlock, flags); spin_lock_irqsave(&speakup_info.spinlock, flags);

View File

@ -122,7 +122,7 @@ void spk_do_catch_up(struct spk_synth *synth)
schedule_timeout(msecs_to_jiffies(full_time_val)); schedule_timeout(msecs_to_jiffies(full_time_val));
continue; continue;
} }
if ((jiffies >= jiff_max) && (ch == SPACE)) { if (time_after_eq(jiffies, jiff_max) && (ch == SPACE)) {
spin_lock_irqsave(&speakup_info.spinlock, flags); spin_lock_irqsave(&speakup_info.spinlock, flags);
jiffy_delta_val = jiffy_delta->u.n.value; jiffy_delta_val = jiffy_delta->u.n.value;
delay_time_val = delay_time->u.n.value; delay_time_val = delay_time->u.n.value;