diff options
author | David S. Miller <davem@davemloft.net> | 2011-04-11 16:44:25 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-04-11 16:44:25 -0400 |
commit | 1c01a80cfec6f806246f31ff2680cd3639b30e67 (patch) | |
tree | 0b554aad2ec1da71ecf6339d4ba51617bfe1dc3c /drivers/tty/n_tty.c | |
parent | c44d79950b2daa1025e62eede73e4e4a274d1ef3 (diff) | |
parent | 4a9f65f6304a00f6473e83b19c1e83caa1e42530 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/smsc911x.c
Diffstat (limited to 'drivers/tty/n_tty.c')
-rw-r--r-- | drivers/tty/n_tty.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c index 428f4fe0b5f..0ad32888091 100644 --- a/drivers/tty/n_tty.c +++ b/drivers/tty/n_tty.c | |||
@@ -95,6 +95,7 @@ static void n_tty_set_room(struct tty_struct *tty) | |||
95 | { | 95 | { |
96 | /* tty->read_cnt is not read locked ? */ | 96 | /* tty->read_cnt is not read locked ? */ |
97 | int left = N_TTY_BUF_SIZE - tty->read_cnt - 1; | 97 | int left = N_TTY_BUF_SIZE - tty->read_cnt - 1; |
98 | int old_left; | ||
98 | 99 | ||
99 | /* | 100 | /* |
100 | * If we are doing input canonicalization, and there are no | 101 | * If we are doing input canonicalization, and there are no |
@@ -104,7 +105,12 @@ static void n_tty_set_room(struct tty_struct *tty) | |||
104 | */ | 105 | */ |
105 | if (left <= 0) | 106 | if (left <= 0) |
106 | left = tty->icanon && !tty->canon_data; | 107 | left = tty->icanon && !tty->canon_data; |
108 | old_left = tty->receive_room; | ||
107 | tty->receive_room = left; | 109 | tty->receive_room = left; |
110 | |||
111 | /* Did this open up the receive buffer? We may need to flip */ | ||
112 | if (left && !old_left) | ||
113 | schedule_work(&tty->buf.work); | ||
108 | } | 114 | } |
109 | 115 | ||
110 | static void put_tty_queue_nolock(unsigned char c, struct tty_struct *tty) | 116 | static void put_tty_queue_nolock(unsigned char c, struct tty_struct *tty) |