diff options
-rw-r--r-- | tty/tiny_serial.c | 7 | ||||
-rw-r--r-- | tty/tiny_tty.c | 10 |
2 files changed, 11 insertions, 6 deletions
diff --git a/tty/tiny_serial.c b/tty/tiny_serial.c index 67acda3..4fda428 100644 --- a/tty/tiny_serial.c +++ b/tty/tiny_serial.c @@ -96,6 +96,7 @@ static void tiny_timer(unsigned long data) { struct uart_port *port; struct tty_struct *tty; + struct tty_port *tty_port; port = (struct uart_port *)data; @@ -107,11 +108,13 @@ static void tiny_timer(unsigned long data) if (!tty) return; + tty_port = tty->port; + /* add one character to the tty port */ /* this doesn't actually push the data through unless tty->low_latency is set */ - tty_insert_flip_char(tty, TINY_DATA_CHARACTER, 0); + tty_insert_flip_char(tty_port, TINY_DATA_CHARACTER, 0); - tty_flip_buffer_push(tty); + tty_flip_buffer_push(tty_port); /* resubmit the timer again */ timer->expires = jiffies + DELAY_TIME; diff --git a/tty/tiny_tty.c b/tty/tiny_tty.c index 64a74c7..b63e443 100644 --- a/tty/tiny_tty.c +++ b/tty/tiny_tty.c @@ -65,6 +65,7 @@ static void tiny_timer(unsigned long timer_data) { struct tiny_serial *tiny = (struct tiny_serial *)timer_data; struct tty_struct *tty; + struct tty_port *port; int i; char data[1] = {TINY_DATA_CHARACTER}; int data_size = 1; @@ -73,15 +74,16 @@ static void tiny_timer(unsigned long timer_data) return; tty = tiny->tty; + port = tty->port; /* send the data to the tty layer for users to read. This doesn't * actually push the data through unless tty->low_latency is set */ for (i = 0; i < data_size; ++i) { - if (!tty_buffer_request_room(tty, 1)) - tty_flip_buffer_push(tty); - tty_insert_flip_char(tty, data[i], TTY_NORMAL); + if (!tty_buffer_request_room(port, 1)) + tty_flip_buffer_push(port); + tty_insert_flip_char(port, data[i], TTY_NORMAL); } - tty_flip_buffer_push(tty); + tty_flip_buffer_push(port); /* resubmit the timer again */ tiny->timer->expires = jiffies + DELAY_TIME; |