Hi.
I think there is a confusion with n_tty_chars_in_buffer(): it
calculates the amount of input chars, but is used as a
.chars_in_buffer member of tty_ldisc_ops, which, AFAIK,
should calculate the amount of _output_ chars buffered.
Here is the patch that changes this.
Since it doesn't fix any problem I can practically observe,
the chances are high that I am missing something obvious.
Can someone please take a look if there is really a bug here?