Skip to content

Commit

Permalink
USB: ftdi_sio.c:Fill TX field of the ftdi async_icount structure
Browse files Browse the repository at this point in the history
Signed-off-by: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Uwe Bonnes authored and Greg Kroah-Hartman committed Oct 18, 2011
1 parent c9222ec commit da7fbb6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/usb/serial/ftdi_sio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1918,13 +1918,15 @@ static int ftdi_prepare_write_buffer(struct usb_serial_port *port,
c = kfifo_out(&port->write_fifo, &buffer[i + 1], len);
if (!c)
break;
priv->icount.tx += c;
buffer[i] = (c << 2) + 1;
count += c + 1;
}
spin_unlock_irqrestore(&port->lock, flags);
} else {
count = kfifo_out_locked(&port->write_fifo, dest, size,
&port->lock);
priv->icount.tx += count;
}

return count;
Expand Down

0 comments on commit da7fbb6

Please sign in to comment.