diff options
author | Okash Khawaja <okash.khawaja@gmail.com> | 2017-04-22 09:00:28 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-04-25 20:45:12 +0200 |
commit | be223d577578c38c09f5dc9dd1fda8b5f0c91320 (patch) | |
tree | 31ecd431638c8471d2995a43f5702b1b181b458f /drivers/staging/speakup/speakup_audptr.c | |
parent | staging: comedi: addi_apci_3xxx: check return value (diff) | |
download | linux-dev-be223d577578c38c09f5dc9dd1fda8b5f0c91320.tar.xz linux-dev-be223d577578c38c09f5dc9dd1fda8b5f0c91320.zip |
staging: speakup: add send_xchar and tiocmset methods
This adds two methods to spk_synth struct: send_xchar and tiocmset, and
creates serial implementation for each of them. It takes existing code
in apollo, audptr and spkout which already fits the behaviour of
send_xchar and tiocmset. In follow-up patches there will be TTY-based
implementations of these methods. Then migrating the synths to TTY will
include repointing these methods to their TTY implementations
Rest of the changes simply make use of serial implementation of these two
functions.
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_audptr.c')
-rw-r--r-- | drivers/staging/speakup/speakup_audptr.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/staging/speakup/speakup_audptr.c b/drivers/staging/speakup/speakup_audptr.c index da3fd94a6ad9..6880352a7b74 100644 --- a/drivers/staging/speakup/speakup_audptr.c +++ b/drivers/staging/speakup/speakup_audptr.c @@ -128,14 +128,7 @@ static struct spk_synth synth_audptr = { static void synth_flush(struct spk_synth *synth) { - int timeout = SPK_XMITR_TIMEOUT; - - while (spk_serial_tx_busy()) { - if (!--timeout) - break; - udelay(1); - } - outb(SYNTH_CLEAR, speakup_info.port_tts); + synth->io_ops->send_xchar(SYNTH_CLEAR); synth->io_ops->synth_out(synth, PROCSPEECH); } |