]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/char/hvc_console.c
[PATCH] Remove file riowinif.h from rio driver (unused file)
[linux-2.6-omap-h63xx.git] / drivers / char / hvc_console.c
index f921776346779aa8516d7ce861e6c44c6cc50165..1994a92d473390d9b723ecae80406bc27ef548d3 100644 (file)
@@ -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);
 
                /*