Commit 76a55431 authored by Vitaly Bordug's avatar Vitaly Bordug Committed by Russell King

[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: default avatarVitaly Bordug <vbordug@ru.mvista.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent deb37bb7
...@@ -252,13 +252,10 @@ static void cpm_uart_int_rx(struct uart_port *port, struct pt_regs *regs) ...@@ -252,13 +252,10 @@ 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 /* If we have not enough room in tty flip buffer, then we try
* later, which will be the next rx-interrupt or a timeout * later, which will be the next rx-interrupt or a timeout
*/ */
if ((tty->flip.count + i) >= TTY_FLIPBUF_SIZE) { if(tty_buffer_request_room(tty, i) < i) {
tty->flip.work.func((void *)tty); printk(KERN_WARNING "No room in flip buffer\n");
if ((tty->flip.count + i) >= TTY_FLIPBUF_SIZE) {
printk(KERN_WARNING "TTY_DONT_FLIP set\n");
return; return;
} }
}
/* get pointer */ /* get pointer */
cp = cpm2cpu_addr(bdp->cbd_bufaddr); cp = cpm2cpu_addr(bdp->cbd_bufaddr);
...@@ -276,9 +273,7 @@ static void cpm_uart_int_rx(struct uart_port *port, struct pt_regs *regs) ...@@ -276,9 +273,7 @@ static void cpm_uart_int_rx(struct uart_port *port, struct pt_regs *regs)
continue; continue;
error_return: error_return:
*tty->flip.char_buf_ptr++ = ch; tty_insert_flip_char(tty, ch, flg);
*tty->flip.flag_buf_ptr++ = flg;
tty->flip.count++;
} /* End while (i--) */ } /* End while (i--) */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment