diff options
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 7f3d87b..a97d3d5 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; } |