diff options
author | Javier Martinez Canillas <javier@dowhile0.org> | 2013-04-26 22:56:05 +0200 |
---|---|---|
committer | Javier Martinez Canillas <javier@dowhile0.org> | 2013-04-27 01:48:13 +0200 |
commit | d9c53b5a84cc98e901b5eb0bdd925edecbe334d7 (patch) | |
tree | a2a8a16316cc219a3864c95f94434316faea14a4 /tty | |
parent | fbb342780c8ce22579fedb4ef260d0ac3cd764d8 (diff) | |
download | ldd3-d9c53b5a84cc98e901b5eb0bdd925edecbe334d7.tar.gz |
tty: pass tty_port to tty functions instead of tty_struct
commit 227434f8 ("TTY: switch tty_buffer_request_room to tty_port")
started to convert all tty functions to receive a tty_port
instead of a tt_struct. Update the drivers according this
API change.
Signed-off-by: Javier Martinez Canillas <javier@dowhile0.org>
Diffstat (limited to 'tty')
-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; |