提交 4944d400 编写于 作者: A Alan Cox 提交者: Linus Torvalds

omninet: Use string flip functions

Signed-off-by: NAlan Cox <alan@redhat.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 f89d0dff
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册