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 67/70] omninet: Use string flip functions
Date
From: Alan Cox <alan@redhat.com>



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

drivers/usb/serial/omninet.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)


diff --git a/drivers/usb/serial/omninet.c b/drivers/usb/serial/omninet.c
index 5a76f32..ae8e227 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);
}



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