Skip to content

Commit

Permalink
omninet: Use string flip functions
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alan Cox authored and Linus Torvalds committed Jul 22, 2008
1 parent f89d0df commit 4944d40
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions drivers/usb/serial/omninet.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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);
}

Expand Down

0 comments on commit 4944d40

Please sign in to comment.