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 f92177634677..1994a92d4733 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) | |||
597 | 597 | ||
598 | /* Read data if any */ | 598 | /* Read data if any */ |
599 | for (;;) { | 599 | for (;;) { |
600 | int count = N_INBUF; | 600 | int count = tty_buffer_request_room(tty, N_INBUF); |
601 | if (count > (TTY_FLIPBUF_SIZE - tty->flip.count)) | ||
602 | count = TTY_FLIPBUF_SIZE - tty->flip.count; | ||
603 | 601 | ||
604 | /* If flip is full, just reschedule a later read */ | 602 | /* If flip is full, just reschedule a later read */ |
605 | if (count == 0) { | 603 | if (count == 0) { |
@@ -635,7 +633,7 @@ static int hvc_poll(struct hvc_struct *hp) | |||
635 | tty_insert_flip_char(tty, buf[i], 0); | 633 | tty_insert_flip_char(tty, buf[i], 0); |
636 | } | 634 | } |
637 | 635 | ||
638 | if (tty->flip.count) | 636 | if (count) |
639 | tty_schedule_flip(tty); | 637 | tty_schedule_flip(tty); |
640 | 638 | ||
641 | /* | 639 | /* |