aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/speakup/speakup_dectlk.c
diff options
context:
space:
mode:
authorOkash Khawaja <okash.khawaja@gmail.com>2017-03-14 13:41:52 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-03-16 11:10:18 +0900
commit9176d156ca8d931bec0bf5fa3239524d94da866a (patch)
treea3a8f259de1f0380aa9ee7eecfb696bddd9ca51c /drivers/staging/speakup/speakup_dectlk.c
parentstaging: dgnc: remove useless switch-case statements (diff)
downloadlinux-dev-9176d156ca8d931bec0bf5fa3239524d94da866a.tar.xz
linux-dev-9176d156ca8d931bec0bf5fa3239524d94da866a.zip
staging: speakup: spk_serial_out and spk_wait_for_xmitr to take synth arg
These two functions are always called from a context where spk_synth instance is available. They also use the spk_synth instance but instead of taking it as an argument, they rely on a global spk_synth instance inside synth.c which points to the same synth as the one being passed in as argument. Signed-off-by: Okash Khawaja <okash.khawaja@gmail.com> Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/speakup/speakup_dectlk.c')
-rw-r--r--drivers/staging/speakup/speakup_dectlk.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/staging/speakup/speakup_dectlk.c b/drivers/staging/speakup/speakup_dectlk.c
index e0f2d6121890..8cdf197d6800 100644
--- a/drivers/staging/speakup/speakup_dectlk.c
+++ b/drivers/staging/speakup/speakup_dectlk.c
@@ -251,7 +251,7 @@ static void do_catch_up(struct spk_synth *synth)
spin_unlock_irqrestore(&speakup_info.spinlock, flags);
if (ch == '\n')
ch = 0x0D;
- if (synth_full_val || !spk_serial_out(ch)) {
+ if (synth_full_val || !spk_serial_out(synth, ch)) {
schedule_timeout(msecs_to_jiffies(delay_time_val));
continue;
}
@@ -265,10 +265,10 @@ static void do_catch_up(struct spk_synth *synth)
in_escape = 0;
else if (ch <= SPACE) {
if (!in_escape && strchr(",.!?;:", last))
- spk_serial_out(PROCSPEECH);
+ spk_serial_out(synth, PROCSPEECH);
if (time_after_eq(jiffies, jiff_max)) {
if (!in_escape)
- spk_serial_out(PROCSPEECH);
+ spk_serial_out(synth, PROCSPEECH);
spin_lock_irqsave(&speakup_info.spinlock,
flags);
jiffy_delta_val = jiffy_delta->u.n.value;
@@ -283,17 +283,17 @@ static void do_catch_up(struct spk_synth *synth)
last = ch;
}
if (!in_escape)
- spk_serial_out(PROCSPEECH);
+ spk_serial_out(synth, PROCSPEECH);
}
static void synth_flush(struct spk_synth *synth)
{
if (in_escape)
/* if in command output ']' so we don't get an error */
- spk_serial_out(']');
+ spk_serial_out(synth, ']');
in_escape = 0;
is_flushing = 1;
- spk_serial_out(SYNTH_CLEAR);
+ spk_serial_out(synth, SYNTH_CLEAR);
}
module_param_named(ser, synth_dectlk.ser, int, 0444);