diff options
author | Okash Khawaja <okash.khawaja@gmail.com> | 2017-03-14 13:41:53 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-03-16 11:11:22 +0900 |
commit | 1e441594e509c35a222e397d224de17cee103740 (patch) | |
tree | 58602e5db12efb4708720b887c6255efb11f5c5c /drivers/staging/speakup/spk_priv.h | |
parent | 9176d156ca8d931bec0bf5fa3239524d94da866a (diff) | |
download | linux-stable-1e441594e509c35a222e397d224de17cee103740.tar.gz linux-stable-1e441594e509c35a222e397d224de17cee103740.tar.bz2 linux-stable-1e441594e509c35a222e397d224de17cee103740.zip |
staging: speakup: add spk_io_ops struct to spk_synth
This patch adds spk_io_ops struct which contain those methods whose job is to
communicate with synth device. Currently, all comms with external synth
device use raw serial i/o. The idea is to group all methods which do the
actual communication with external device into this new struct. Then migrating
a serial-based synth over to an alternative to raw serial i/o will mean
swapping serial spk_io_ops instance with the io_ops instance of the new
method, making the migration simpler.
At the moment, this struct only contains one method, synth_out but more will
be added in future when migrating synths which require input functionality.
Also at the moment, synth_out method has one implementation which uses
serial i/o. Plan is to add an alternative.
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/spk_priv.h')
-rw-r--r-- | drivers/staging/speakup/spk_priv.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/speakup/spk_priv.h b/drivers/staging/speakup/spk_priv.h index 170599c48155..7e12fecf9380 100644 --- a/drivers/staging/speakup/spk_priv.h +++ b/drivers/staging/speakup/spk_priv.h @@ -45,7 +45,6 @@ void spk_stop_serial_interrupt(void); int spk_wait_for_xmitr(struct spk_synth *in_synth); unsigned char spk_serial_in(void); unsigned char spk_serial_in_nowait(void); -int spk_serial_out(struct spk_synth *in_synth, const char ch); void spk_serial_release(void); void synth_buffer_skip_nonlatin1(void); @@ -79,4 +78,6 @@ extern struct speakup_info_t speakup_info; extern struct var_t synth_time_vars[]; +extern struct spk_io_ops spk_serial_io_ops; + #endif |