diff options
author | Jiri Slaby <jslaby@suse.cz> | 2013-01-03 09:53:01 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-16 01:17:28 -0500 |
commit | 227434f8986c3827a1faedd1feb437acd6285315 (patch) | |
tree | e96f6c6a800b81d096be73c1b7943c7aa24aa632 /arch/mn10300/kernel | |
parent | ea28fd56fcde69af768135e428093f94c5ca6a88 (diff) |
TTY: switch tty_buffer_request_room to tty_port
Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty pointer in
many call sites. Only tty_port will be needed and hence no more
tty_port_tty_get calls in those paths.
Here we start with tty_buffer_request_room.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/mn10300/kernel')
-rw-r--r-- | arch/mn10300/kernel/mn10300-serial.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/mn10300/kernel/mn10300-serial.c b/arch/mn10300/kernel/mn10300-serial.c index 81d5cb9b6569..9b2232a78ff9 100644 --- a/arch/mn10300/kernel/mn10300-serial.c +++ b/arch/mn10300/kernel/mn10300-serial.c | |||
@@ -524,7 +524,8 @@ static int mask_test_and_clear(volatile u8 *ptr, u8 mask) | |||
524 | static void mn10300_serial_receive_interrupt(struct mn10300_serial_port *port) | 524 | static void mn10300_serial_receive_interrupt(struct mn10300_serial_port *port) |
525 | { | 525 | { |
526 | struct uart_icount *icount = &port->uart.icount; | 526 | struct uart_icount *icount = &port->uart.icount; |
527 | struct tty_struct *tty = port->uart.state->port.tty; | 527 | struct tty_port *port = &port->uart.state->port; |
528 | struct tty_struct *tty = port->tty; | ||
528 | unsigned ix; | 529 | unsigned ix; |
529 | int count; | 530 | int count; |
530 | u8 st, ch, push, status, overrun; | 531 | u8 st, ch, push, status, overrun; |
@@ -534,7 +535,7 @@ static void mn10300_serial_receive_interrupt(struct mn10300_serial_port *port) | |||
534 | push = 0; | 535 | push = 0; |
535 | 536 | ||
536 | count = CIRC_CNT(port->rx_inp, port->rx_outp, MNSC_BUFFER_SIZE); | 537 | count = CIRC_CNT(port->rx_inp, port->rx_outp, MNSC_BUFFER_SIZE); |
537 | count = tty_buffer_request_room(tty, count); | 538 | count = tty_buffer_request_room(port, count); |
538 | if (count == 0) { | 539 | if (count == 0) { |
539 | if (!tty->low_latency) | 540 | if (!tty->low_latency) |
540 | tty_flip_buffer_push(tty); | 541 | tty_flip_buffer_push(tty); |