summaryrefslogtreecommitdiff
path: root/drivers/usb/serial/keyspan_pda.c
diff options
context:
space:
mode:
authorAlan Cox <alan@redhat.com>2008-07-22 11:13:51 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-22 13:03:25 -0700
commit8dd03a5b2b775b0932c1705dc19298ccda19167d (patch)
tree13516428be186b568577cb3ba99f58e9763ca7b1 /drivers/usb/serial/keyspan_pda.c
parent9e70f319d14ac4dd077de7fc835a391ece804500 (diff)
downloadlinux-3.10-8dd03a5b2b775b0932c1705dc19298ccda19167d.tar.gz
linux-3.10-8dd03a5b2b775b0932c1705dc19298ccda19167d.tar.bz2
linux-3.10-8dd03a5b2b775b0932c1705dc19298ccda19167d.zip
keyspan_pda: Use string flip functions
Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/usb/serial/keyspan_pda.c')
-rw-r--r--drivers/usb/serial/keyspan_pda.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/usb/serial/keyspan_pda.c b/drivers/usb/serial/keyspan_pda.c
index b60012ce4c9..040040a267d 100644
--- a/drivers/usb/serial/keyspan_pda.c
+++ b/drivers/usb/serial/keyspan_pda.c
@@ -207,7 +207,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;
@@ -235,8 +234,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;