diff options
Diffstat (limited to 'drivers/char/hvc_console.c')
-rw-r--r-- | drivers/char/hvc_console.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/char/hvc_console.c b/drivers/char/hvc_console.c index f921776..1994a92 100644 --- a/drivers/char/hvc_console.c +++ b/drivers/char/hvc_console.c @@ -597,9 +597,7 @@ static int hvc_poll(struct hvc_struct *hp) /* Read data if any */ for (;;) { - int count = N_INBUF; - if (count > (TTY_FLIPBUF_SIZE - tty->flip.count)) - count = TTY_FLIPBUF_SIZE - tty->flip.count; + int count = tty_buffer_request_room(tty, N_INBUF); /* If flip is full, just reschedule a later read */ if (count == 0) { @@ -635,7 +633,7 @@ static int hvc_poll(struct hvc_struct *hp) tty_insert_flip_char(tty, buf[i], 0); } - if (tty->flip.count) + if (count) tty_schedule_flip(tty); /* |