Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 104667
b: refs/heads/master
c: f035a8a
h: refs/heads/master
i:
  104665: 42c0454
  104663: 67c7b86
v: v3
  • Loading branch information
Alan Cox authored and Linus Torvalds committed Jul 22, 2008
1 parent 029cb06 commit a8c83fb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: deb91685784fc0bc845c582f8b2bc229cb7bc9da
refs/heads/master: f035a8ad158f0bdc94125004488b0ea8438edaa9
16 changes: 7 additions & 9 deletions trunk/drivers/usb/serial/keyspan.c
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ static void usa26_glocont_callback(struct urb *urb)

static void usa28_indat_callback(struct urb *urb)
{
int i, err;
int err;
struct usb_serial_port *port;
struct tty_struct *tty;
unsigned char *data;
Expand Down Expand Up @@ -606,8 +606,7 @@ static void usa28_indat_callback(struct urb *urb)

tty = port->port.tty;
if (urb->actual_length) {
for (i = 0; i < urb->actual_length ; ++i)
tty_insert_flip_char(tty, data[i], 0);
tty_insert_flip_string(tty, data, urb->actual_length);
tty_flip_buffer_push(tty);
}

Expand Down Expand Up @@ -833,8 +832,8 @@ static void usa49_indat_callback(struct urb *urb)
/* 0x80 bit is error flag */
if ((data[0] & 0x80) == 0) {
/* no error on any byte */
for (i = 1; i < urb->actual_length ; ++i)
tty_insert_flip_char(tty, data[i], 0);
tty_insert_flip_string(tty, data + 1,
urb->actual_length - 1);
} else {
/* some bytes had errors, every byte has status */
for (i = 0; i + 1 < urb->actual_length; i += 2) {
Expand Down Expand Up @@ -973,10 +972,9 @@ static void usa90_indat_callback(struct urb *urb)
/* if current mode is DMA, looks like usa28 format
otherwise looks like usa26 data format */

if (p_priv->baud > 57600) {
for (i = 0; i < urb->actual_length ; ++i)
tty_insert_flip_char(tty, data[i], 0);
} else {
if (p_priv->baud > 57600)
tty_insert_flip_string(tty, data, urb->actual_length);
else {
/* 0x80 bit is error flag */
if ((data[0] & 0x80) == 0) {
/* no errors on individual bytes, only
Expand Down

0 comments on commit a8c83fb

Please sign in to comment.