X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=drivers%2Fchar%2Fhvcs.c;h=831eb4e8d9d372afd9e79eec2debb0367d9780e4;hb=b4290a23cfa9040e2f0de5ab57d6ea65abaf053b;hp=53dc77c760fccff12a07665cb9bb0f6d6abdcba7;hpb=328198acb7407301ddf6005c0fa1e04bd0c539c8;p=powerpc.git diff --git a/drivers/char/hvcs.c b/drivers/char/hvcs.c index 53dc77c760..831eb4e8d9 100644 --- a/drivers/char/hvcs.c +++ b/drivers/char/hvcs.c @@ -456,12 +456,11 @@ static int hvcs_io(struct hvcs_struct *hvcsd) /* remove the read masks */ hvcsd->todo_mask &= ~(HVCS_READ_MASK); - if ((tty->flip.count + HVCS_BUFF_LEN) < TTY_FLIPBUF_SIZE) { + if (tty_buffer_request_room(tty, HVCS_BUFF_LEN) >= HVCS_BUFF_LEN) { got = hvc_get_chars(unit_address, &buf[0], HVCS_BUFF_LEN); - for (i=0;got && itodo_mask |= HVCS_QUICK_READ; spin_unlock_irqrestore(&hvcsd->lock, flags); - if (tty->flip.count) { - /* This is synch because tty->low_latency == 1 */ + /* This is synch because tty->low_latency == 1 */ + if(got) tty_flip_buffer_push(tty); - } if (!got) { /* Do this _after_ the flip_buffer_push */