linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PPC32 CPM_UART: update to utilize the new TTY flip API
@ 2006-01-15 15:44 Vitaly Bordug
  2006-01-20  5:05 ` Paul Mackerras
  0 siblings, 1 reply; 2+ messages in thread
From: Vitaly Bordug @ 2006-01-15 15:44 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: linuxppc-embedded


This replaces old direct usage of tty->flip stuff with relative flip API
calls.
---

 drivers/serial/cpm_uart/cpm_uart_core.c |   13 ++++---------
 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 16af562..5e25c2d 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_
 		/* 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_
 				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--) */
 

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] PPC32 CPM_UART: update to utilize the new TTY flip API
  2006-01-15 15:44 [PATCH] PPC32 CPM_UART: update to utilize the new TTY flip API Vitaly Bordug
@ 2006-01-20  5:05 ` Paul Mackerras
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Mackerras @ 2006-01-20  5:05 UTC (permalink / raw)
  To: Vitaly Bordug; +Cc: linuxppc-embedded

Vitaly Bordug writes:

> This replaces old direct usage of tty->flip stuff with relative flip API
> calls.

Could I have a Signed-off-by line from you for it please?

Paul.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-01-20  5:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-15 15:44 [PATCH] PPC32 CPM_UART: update to utilize the new TTY flip API Vitaly Bordug
2006-01-20  5:05 ` Paul Mackerras

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).