diff options
Diffstat (limited to 'drivers/staging/speakup/speakup_ltlk.c')
-rw-r--r-- | drivers/staging/speakup/speakup_ltlk.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/staging/speakup/speakup_ltlk.c b/drivers/staging/speakup/speakup_ltlk.c index 11275f49bea4..423795f88f53 100644 --- a/drivers/staging/speakup/speakup_ltlk.c +++ b/drivers/staging/speakup/speakup_ltlk.c @@ -20,7 +20,6 @@ */ #include "speakup.h" #include "spk_priv.h" -#include "serialio.h" #include "speakup_dtlk.h" /* local header file for LiteTalk values */ #define DRV_VERSION "2.11" @@ -108,19 +107,20 @@ static struct spk_synth synth_ltlk = { .trigger = 50, .jiffies = 50, .full = 40000, + .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 = spk_synth_flush, .is_alive = spk_synth_is_alive_restart, .synth_adjust = NULL, .read_buff_add = NULL, - .get_index = spk_serial_in_nowait, + .get_index = spk_synth_get_index, .indexing = { .command = "\x01%di", .lowindex = 1, @@ -141,7 +141,7 @@ static void synth_interrogate(struct spk_synth *synth) synth->synth_immediate(synth, "\x18\x01?"); for (i = 0; i < 50; i++) { - buf[i] = spk_serial_in(); + buf[i] = synth->io_ops->synth_in(); if (i > 2 && buf[i] == 0x7f) break; } @@ -159,7 +159,7 @@ static int synth_probe(struct spk_synth *synth) { int failed = 0; - failed = spk_serial_synth_probe(synth); + failed = spk_ttyio_synth_probe(synth); if (failed == 0) synth_interrogate(synth); synth->alive = !failed; @@ -167,9 +167,11 @@ static int synth_probe(struct spk_synth *synth) } module_param_named(ser, synth_ltlk.ser, int, 0444); +module_param_named(dev, synth_ltlk.dev_name, charp, S_IRUGO); module_param_named(start, synth_ltlk.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_ltlk); |