aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/speakup/synth.c
diff options
context:
space:
mode:
authorOkash Khawaja <okash.khawaja@gmail.com>2017-03-16 08:10:17 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-03-17 15:19:09 +0900
commit98c1fda752b604c68f2d7c9a0e10c6aaa3bd2a17 (patch)
tree11e506767710a24def484f98717dfb8be18e55a7 /drivers/staging/speakup/synth.c
parentStaging: goldfish: use __func__ instead of embedded function names (diff)
downloadlinux-dev-98c1fda752b604c68f2d7c9a0e10c6aaa3bd2a17.tar.xz
linux-dev-98c1fda752b604c68f2d7c9a0e10c6aaa3bd2a17.zip
staging: speakup: move those functions which do outgoing serial comms, into serialio.c
This moves spk_synth_immediate and spk_serial_synth_probe functions into serialio.c. These functions do outgoing serial comms. The move is a step towards collecting all serial comms in serialio.c. This also renames spk_synth_immediate to spk_serial_synth_immediate. Code inside those functions has not been changed. Along the way, this patch also fixes a couple of spots which were calling spk_synth_immediate directly, so that the calls now happen via the spk_syth struct. 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.c46
1 files changed, 0 insertions, 46 deletions
diff --git a/drivers/staging/speakup/synth.c b/drivers/staging/speakup/synth.c
index 989681dcb710..352e9eebc3de 100644
--- a/drivers/staging/speakup/synth.c
+++ b/drivers/staging/speakup/synth.c
@@ -44,35 +44,6 @@ EXPORT_SYMBOL_GPL(speakup_info);
static int do_synth_init(struct spk_synth *in_synth);
-int spk_serial_synth_probe(struct spk_synth *synth)
-{
- const struct old_serial_port *ser;
- int failed = 0;
-
- if ((synth->ser >= SPK_LO_TTY) && (synth->ser <= SPK_HI_TTY)) {
- ser = spk_serial_init(synth->ser);
- if (!ser) {
- failed = -1;
- } else {
- outb_p(0, ser->port);
- mdelay(1);
- outb_p('\r', ser->port);
- }
- } else {
- failed = -1;
- pr_warn("ttyS%i is an invalid port\n", synth->ser);
- }
- if (failed) {
- pr_info("%s: not found\n", synth->long_name);
- return -ENODEV;
- }
- pr_info("%s: ttyS%i, Driver Version %s\n",
- synth->long_name, synth->ser, synth->version);
- synth->alive = 1;
- return 0;
-}
-EXPORT_SYMBOL_GPL(spk_serial_synth_probe);
-
/*
* Main loop of the progression thread: keep eating from the buffer
* and push to the serial port, waiting as needed
@@ -147,23 +118,6 @@ void spk_do_catch_up(struct spk_synth *synth)
}
EXPORT_SYMBOL_GPL(spk_do_catch_up);
-const char *spk_synth_immediate(struct spk_synth *synth, const char *buff)
-{
- u_char ch;
-
- while ((ch = *buff)) {
- if (ch == '\n')
- ch = synth->procspeech;
- if (spk_wait_for_xmitr(synth))
- outb(ch, speakup_info.port_tts);
- else
- return buff;
- buff++;
- }
- return NULL;
-}
-EXPORT_SYMBOL_GPL(spk_synth_immediate);
-
void spk_synth_flush(struct spk_synth *synth)
{
synth->io_ops->synth_out(synth, synth->clear);