HVC returns a size of -1 bytes for the write room in some cases.
This is bogus and not handled by the tty layer at all.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Alan Cox 2012-09-17 12:03:39 +01:00 коммит произвёл Greg Kroah-Hartman
Родитель 7ac3c93e5d
Коммит d83114e975
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -558,7 +558,7 @@ static int hvc_write_room(struct tty_struct *tty)
struct hvc_struct *hp = tty->driver_data; struct hvc_struct *hp = tty->driver_data;
if (!hp) if (!hp)
return -1; return 0;
return hp->outbuf_size - hp->n_outbuf; return hp->outbuf_size - hp->n_outbuf;
} }