diff options
Diffstat (limited to 'drivers/staging/speakup/speakup_audptr.c')
-rw-r--r-- | drivers/staging/speakup/speakup_audptr.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/staging/speakup/speakup_audptr.c b/drivers/staging/speakup/speakup_audptr.c index 6880352a7b74..8ae826eba71c 100644 --- a/drivers/staging/speakup/speakup_audptr.c +++ b/drivers/staging/speakup/speakup_audptr.c @@ -20,7 +20,6 @@ */ #include "spk_priv.h" #include "speakup.h" -#include "serialio.h" #define DRV_VERSION "2.11" #define SYNTH_CLEAR 0x18 /* flush synth buffer */ @@ -101,13 +100,14 @@ static struct spk_synth synth_audptr = { .trigger = 50, .jiffies = 30, .full = 18000, + .dev_name = SYNTH_DEFAULT_DEV, .startup = SYNTH_START, .checkval = SYNTH_CHECK, .vars = vars, - .io_ops = &spk_serial_io_ops, + .io_ops = &spk_ttyio_ops, .probe = synth_probe, - .release = spk_serial_release, - .synth_immediate = spk_serial_synth_immediate, + .release = spk_ttyio_release, + .synth_immediate = spk_ttyio_synth_immediate, .catch_up = spk_do_catch_up, .flush = synth_flush, .is_alive = spk_synth_is_alive_restart, @@ -128,6 +128,7 @@ static struct spk_synth synth_audptr = { static void synth_flush(struct spk_synth *synth) { + synth->io_ops->flush_buffer(); synth->io_ops->send_xchar(SYNTH_CLEAR); synth->io_ops->synth_out(synth, PROCSPEECH); } @@ -138,11 +139,11 @@ static void synth_version(struct spk_synth *synth) char synth_id[40] = ""; synth->synth_immediate(synth, "\x05[Q]"); - synth_id[test] = spk_serial_in(); + synth_id[test] = synth->io_ops->synth_in(); if (synth_id[test] == 'A') { do { /* read version string from synth */ - synth_id[++test] = spk_serial_in(); + synth_id[++test] = synth->io_ops->synth_in(); } while (synth_id[test] != '\n' && test < 32); synth_id[++test] = 0x00; } @@ -154,7 +155,7 @@ static int synth_probe(struct spk_synth *synth) { int failed; - failed = spk_serial_synth_probe(synth); + failed = spk_ttyio_synth_probe(synth); if (failed == 0) synth_version(synth); synth->alive = !failed; @@ -162,9 +163,11 @@ static int synth_probe(struct spk_synth *synth) } module_param_named(ser, synth_audptr.ser, int, 0444); +module_param_named(dev, synth_audptr.dev_name, charp, S_IRUGO); module_param_named(start, synth_audptr.startup, short, 0444); MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based)."); +MODULE_PARM_DESC(dev, "Set the device e.g. ttyUSB0, for the synthesizer."); MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded."); module_spk_synth(synth_audptr); |