summaryrefslogtreecommitdiffstats
path: root/drivers/tty/n_tty.c
diff options
context:
space:
mode:
authorJiri Slaby2012-10-18 22:26:47 +0200
committerGreg Kroah-Hartman2012-10-23 01:58:28 +0200
commitecbbfd44a08fa80e0d664814efd4c187721b85f6 (patch)
treef1c9aea12eb27323b9e7f4b8329e47dc3c30e63d /drivers/tty/n_tty.c
parentTTY: add port -> tty link (diff)
downloadkernel-qcow2-linux-ecbbfd44a08fa80e0d664814efd4c187721b85f6.tar.gz
kernel-qcow2-linux-ecbbfd44a08fa80e0d664814efd4c187721b85f6.tar.xz
kernel-qcow2-linux-ecbbfd44a08fa80e0d664814efd4c187721b85f6.zip
TTY: move tty buffers to tty_port
So this is it. The big step why we did all the work over the past kernel releases. Now everything is prepared, so nothing protects us from doing that big step. | | \ \ nnnn/^l | | | | \ / / | | | '-,.__ => \/ ,-` => | '-,.__ | O __.´´) ( .` | O __.´´) ~~~ ~~ `` ~~~ ~~ The buffers are now in the tty_port structure and we can start teaching the buffer helpers (insert char/string, flip etc.) to use tty_port instead of tty_struct all around. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/n_tty.c')
-rw-r--r--drivers/tty/n_tty.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c
index 531e539dbfcf..60b076cc4e20 100644
--- a/drivers/tty/n_tty.c
+++ b/drivers/tty/n_tty.c
@@ -149,8 +149,11 @@ static void n_tty_set_room(struct tty_struct *tty)
tty->receive_room = left;
/* Did this open up the receive buffer? We may need to flip */
- if (left && !old_left)
- schedule_work(&tty->buf.work);
+ if (left && !old_left) {
+ WARN_RATELIMIT(tty->port->itty == NULL,
+ "scheduling with invalid itty");
+ schedule_work(&tty->port->buf.work);
+ }
}
static void put_tty_queue_nolock(unsigned char c, struct n_tty_data *ldata)