lkml.org 
[lkml]   [2008]   [Jun]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 54/70] keyspan_pda: Use string flip functions
Date
From: Alan Cox <alan@redhat.com>



Signed-off-by: Alan Cox <alan@redhat.com>
---

drivers/usb/serial/keyspan_pda.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)


diff --git a/drivers/usb/serial/keyspan_pda.c b/drivers/usb/serial/keyspan_pda.c
index 928f545..b11329e 100644
--- a/drivers/usb/serial/keyspan_pda.c
+++ b/drivers/usb/serial/keyspan_pda.c
@@ -220,7 +220,6 @@ static void keyspan_pda_rx_interrupt(struct urb *urb)
struct usb_serial_port *port = urb->context;
struct tty_struct *tty = port->port.tty;
unsigned char *data = urb->transfer_buffer;
- int i;
int retval;
int status = urb->status;
struct keyspan_pda_private *priv;
@@ -248,8 +247,8 @@ static void keyspan_pda_rx_interrupt(struct urb *urb)
case 0:
/* rest of message is rx data */
if (urb->actual_length) {
- for (i = 1; i < urb->actual_length ; ++i)
- tty_insert_flip_char(tty, data[i], 0);
+ tty_insert_flip_string(tty, data + 1,
+ urb->actual_length - 1);
tty_flip_buffer_push(tty);
}
break;


\
 
 \ /
  Last update: 2008-06-20 22:43    [W:0.195 / U:7.404 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site