aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/hvcs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/hvcs.c')
-rw-r--r--drivers/char/hvcs.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/char/hvcs.c b/drivers/char/hvcs.c
index 53dc77c760fc..831eb4e8d9d3 100644
--- a/drivers/char/hvcs.c
+++ b/drivers/char/hvcs.c
@@ -456,12 +456,11 @@ static int hvcs_io(struct hvcs_struct *hvcsd)
456 /* remove the read masks */ 456 /* remove the read masks */
457 hvcsd->todo_mask &= ~(HVCS_READ_MASK); 457 hvcsd->todo_mask &= ~(HVCS_READ_MASK);
458 458
459 if ((tty->flip.count + HVCS_BUFF_LEN) < TTY_FLIPBUF_SIZE) { 459 if (tty_buffer_request_room(tty, HVCS_BUFF_LEN) >= HVCS_BUFF_LEN) {
460 got = hvc_get_chars(unit_address, 460 got = hvc_get_chars(unit_address,
461 &buf[0], 461 &buf[0],
462 HVCS_BUFF_LEN); 462 HVCS_BUFF_LEN);
463 for (i=0;got && i<got;i++) 463 tty_insert_flip_string(tty, buf, got);
464 tty_insert_flip_char(tty, buf[i], TTY_NORMAL);
465 } 464 }
466 465
467 /* Give the TTY time to process the data we just sent. */ 466 /* Give the TTY time to process the data we just sent. */
@@ -469,10 +468,9 @@ static int hvcs_io(struct hvcs_struct *hvcsd)
469 hvcsd->todo_mask |= HVCS_QUICK_READ; 468 hvcsd->todo_mask |= HVCS_QUICK_READ;
470 469
471 spin_unlock_irqrestore(&hvcsd->lock, flags); 470 spin_unlock_irqrestore(&hvcsd->lock, flags);
472 if (tty->flip.count) { 471 /* This is synch because tty->low_latency == 1 */
473 /* This is synch because tty->low_latency == 1 */ 472 if(got)
474 tty_flip_buffer_push(tty); 473 tty_flip_buffer_push(tty);
475 }
476 474
477 if (!got) { 475 if (!got) {
478 /* Do this _after_ the flip_buffer_push */ 476 /* Do this _after_ the flip_buffer_push */