From: Alan Cox Date: Tue, 22 Jul 2008 10:16:03 +0000 (+0100) Subject: omninet: Use string flip functions X-Git-Tag: v2.6.27-rc1~895 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=4944d40054d73b2f8d7d546f55c206eb3baf2710;p=linux-2.6-omap-h63xx.git omninet: Use string flip functions Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman Signed-off-by: Linus Torvalds --- 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); }