* [PATCH] tty: Fix hvc return
@ 2012-09-17 11:03 Alan Cox
0 siblings, 0 replies; only message in thread
From: Alan Cox @ 2012-09-17 11:03 UTC (permalink / raw)
To: greg, linux-serial
From: Alan Cox <alan@linux.intel.com>
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>
---
drivers/tty/hvc/hvc_console.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/hvc/hvc_console.c b/drivers/tty/hvc/hvc_console.c
index b57dcbd..a5dec1c 100644
--- a/drivers/tty/hvc/hvc_console.c
+++ b/drivers/tty/hvc/hvc_console.c
@@ -568,7 +568,7 @@ static int hvc_write_room(struct tty_struct *tty)
struct hvc_struct *hp = tty->driver_data;
if (!hp)
- return -1;
+ return 0;
return hp->outbuf_size - hp->n_outbuf;
}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-09-17 10:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-17 11:03 [PATCH] tty: Fix hvc return Alan Cox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).