aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/serial
diff options
context:
space:
mode:
authorAlan Cox <alan@redhat.com>2008-07-22 11:16:03 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-22 13:03:26 -0700
commit4944d40054d73b2f8d7d546f55c206eb3baf2710 (patch)
treec75209b30f2f0b20262d902e4fa85c84d08c0f1a /drivers/usb/serial
parentf89d0dff2507b6bd486b7db59a5f6a733fbfaa12 (diff)
omninet: 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')
-rw-r--r--drivers/usb/serial/omninet.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/usb/serial/omninet.c b/drivers/usb/serial/omninet.c
index 5a76f327ef5..ae8e227f3db 100644
--- a/drivers/usb/serial/omninet.c
+++ b/drivers/usb/serial/omninet.c
@@ -206,8 +206,8 @@ static void omninet_read_bulk_callback(struct urb *urb)
unsigned char *data = urb->transfer_buffer;
struct omninet_header *header = (struct omninet_header *) &data[0];
int status = urb->status;
- int i;
int result;
+ int i;
dbg("%s - port %d", __func__, port->number);
@@ -229,9 +229,8 @@ static void omninet_read_bulk_callback(struct urb *urb)
}
if (urb->actual_length && header->oh_len) {
- for (i = 0; i < header->oh_len; i++)
- tty_insert_flip_char(port->port.tty,
- data[OMNINET_DATAOFFSET + i], 0);
+ tty_insert_flip_string(port->port.tty,
+ data + OMNINET_DATAOFFSET, header->oh_len);
tty_flip_buffer_push(port->port.tty);
}