aboutsummaryrefslogtreecommitdiff
path: root/drivers/serial/cpm_uart
diff options
context:
space:
mode:
authorVitaly Bordug <vbordug@ru.mvista.com>2006-02-08 21:40:13 +0000
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-02-08 21:40:13 +0000
commit76a55431cc7237f018c7c667860d60e2b6427bf1 (patch)
treea294ca801340802b50015944d5cf6874b7ae0f7f /drivers/serial/cpm_uart
parentdeb37bb7a94c052140d1461a09b877a00e7e2476 (diff)
[SERIAL] PPC32 CPM_UART: update to utilize the new TTY flip API
This replaces old direct usage of tty->flip stuff with relative flip API calls. Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/serial/cpm_uart')
-rw-r--r--drivers/serial/cpm_uart/cpm_uart_core.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/serial/cpm_uart/cpm_uart_core.c b/drivers/serial/cpm_uart/cpm_uart_core.c
index 3d80846e384..b7bf4c698a4 100644
--- a/drivers/serial/cpm_uart/cpm_uart_core.c
+++ b/drivers/serial/cpm_uart/cpm_uart_core.c
@@ -252,12 +252,9 @@ static void cpm_uart_int_rx(struct uart_port *port, struct pt_regs *regs)
/* If we have not enough room in tty flip buffer, then we try
* later, which will be the next rx-interrupt or a timeout
*/
- if ((tty->flip.count + i) >= TTY_FLIPBUF_SIZE) {
- tty->flip.work.func((void *)tty);
- if ((tty->flip.count + i) >= TTY_FLIPBUF_SIZE) {
- printk(KERN_WARNING "TTY_DONT_FLIP set\n");
- return;
- }
+ if(tty_buffer_request_room(tty, i) < i) {
+ printk(KERN_WARNING "No room in flip buffer\n");
+ return;
}
/* get pointer */
@@ -276,9 +273,7 @@ static void cpm_uart_int_rx(struct uart_port *port, struct pt_regs *regs)
continue;
error_return:
- *tty->flip.char_buf_ptr++ = ch;
- *tty->flip.flag_buf_ptr++ = flg;
- tty->flip.count++;
+ tty_insert_flip_char(tty, ch, flg);
} /* End while (i--) */