aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/speakup/synth.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/synth.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/synth.c')
-rw-r--r--drivers/staging/speakup/synth.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/staging/speakup/synth.c b/drivers/staging/speakup/synth.c
index 4d59917a2961..41967c9e5003 100644
--- a/drivers/staging/speakup/synth.c
+++ b/drivers/staging/speakup/synth.c
@@ -120,7 +120,7 @@ void spk_do_catch_up(struct spk_synth *synth)
spin_unlock_irqrestore(&speakup_info.spinlock, flags);
if (ch == '\n')
ch = synth->procspeech;
- if (!spk_serial_out(ch)) {
+ if (!spk_serial_out(synth, ch)) {
schedule_timeout(msecs_to_jiffies(full_time_val));
continue;
}
@@ -130,7 +130,7 @@ void spk_do_catch_up(struct spk_synth *synth)
delay_time_val = delay_time->u.n.value;
full_time_val = full_time->u.n.value;
spin_unlock_irqrestore(&speakup_info.spinlock, flags);
- if (spk_serial_out(synth->procspeech))
+ if (spk_serial_out(synth, synth->procspeech))
schedule_timeout(
msecs_to_jiffies(delay_time_val));
else
@@ -143,7 +143,7 @@ void spk_do_catch_up(struct spk_synth *synth)
synth_buffer_getc();
spin_unlock_irqrestore(&speakup_info.spinlock, flags);
}
- spk_serial_out(synth->procspeech);
+ spk_serial_out(synth, synth->procspeech);
}
EXPORT_SYMBOL_GPL(spk_do_catch_up);
@@ -154,7 +154,7 @@ const char *spk_synth_immediate(struct spk_synth *synth, const char *buff)
while ((ch = *buff)) {
if (ch == '\n')
ch = synth->procspeech;
- if (spk_wait_for_xmitr())
+ if (spk_wait_for_xmitr(synth))
outb(ch, speakup_info.port_tts);
else
return buff;
@@ -166,7 +166,7 @@ EXPORT_SYMBOL_GPL(spk_synth_immediate);
void spk_synth_flush(struct spk_synth *synth)
{
- spk_serial_out(synth->clear);
+ spk_serial_out(synth, synth->clear);
}
EXPORT_SYMBOL_GPL(spk_synth_flush);
@@ -181,7 +181,7 @@ int spk_synth_is_alive_restart(struct spk_synth *synth)
{
if (synth->alive)
return 1;
- if (spk_wait_for_xmitr() > 0) {
+ if (spk_wait_for_xmitr(synth) > 0) {
/* restart */
synth->alive = 1;
synth_printf("%s", synth->init);