diff options
author | Jiri Slaby <jslaby@suse.cz> | 2012-03-05 14:52:11 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-03-08 11:47:02 -0800 |
commit | 3ee0017e03cd790ed1adaa97ef6f99aff3706ec2 (patch) | |
tree | 59cfd3fd39c88145dd581a622b555e3bd119d17d /drivers/staging/speakup/serialio.c | |
parent | TTY: remove serialP.h inclusion from some files (diff) | |
download | linux-dev-3ee0017e03cd790ed1adaa97ef6f99aff3706ec2.tar.xz linux-dev-3ee0017e03cd790ed1adaa97ef6f99aff3706ec2.zip |
TTY: speakup, do not use serialP
The structures there are going away. And speakup has enough troubles
already.
So define a structure similar to what 8250 does: old_serial_port.
There define an array of speed, port base and so on needed for
configuration. Then use this structure instead of serial_state defined
in serialP.h.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: William Hubbs <w.d.hubbs@gmail.com>
Cc: Chris Brannon <chris@the-brannons.com>
Cc: Kirk Reiser <kirk@braille.uwo.ca>
Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/speakup/serialio.c')
-rw-r--r-- | drivers/staging/speakup/serialio.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/staging/speakup/serialio.c b/drivers/staging/speakup/serialio.c index 7f3d87bf5927..a97d3d5b58a4 100644 --- a/drivers/staging/speakup/serialio.c +++ b/drivers/staging/speakup/serialio.c @@ -8,21 +8,20 @@ static void start_serial_interrupt(int irq); -static struct serial_state rs_table[] = { +static const struct old_serial_port rs_table[] = { SERIAL_PORT_DFNS }; -static struct serial_state *serstate; +static const struct old_serial_port *serstate; static int timeouts; -struct serial_state *spk_serial_init(int index) +const struct old_serial_port *spk_serial_init(int index) { int baud = 9600, quot = 0; unsigned int cval = 0; int cflag = CREAD | HUPCL | CLOCAL | B9600 | CS8; - struct serial_state *ser = NULL; + const struct old_serial_port *ser = rs_table + index; int err; - ser = rs_table + index; /* Divisor, bytesize and parity */ quot = ser->baud_base / baud; cval = cflag & (CSIZE | CSTOPB); @@ -41,7 +40,7 @@ struct serial_state *spk_serial_init(int index) __release_region(&ioport_resource, ser->port, 8); err = synth_request_region(ser->port, 8); if (err) { - pr_warn("Unable to allocate port at %lx, errno %i", + pr_warn("Unable to allocate port at %x, errno %i", ser->port, err); return NULL; } |