Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 354570
b: refs/heads/master
c: 263e1f9
h: refs/heads/master
v: v3
  • Loading branch information
Johan Hovold authored and Greg Kroah-Hartman committed Jan 18, 2013
1 parent 44fb212 commit 96b8c19
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 810360a03597afc0d43a45798a52cfb69b8453d3
refs/heads/master: 263e1f9fbb999fb78df5bfed87ddbba1c12ee0f1
7 changes: 7 additions & 0 deletions trunk/drivers/usb/serial/io_ti.c
Original file line number Diff line number Diff line change
Expand Up @@ -2088,6 +2088,7 @@ static int edge_chars_in_buffer(struct tty_struct *tty)
struct edgeport_port *edge_port = usb_get_serial_port_data(port);
int chars = 0;
unsigned long flags;
int ret;

if (edge_port == NULL)
return 0;
Expand All @@ -2098,6 +2099,12 @@ static int edge_chars_in_buffer(struct tty_struct *tty)
chars = kfifo_len(&edge_port->write_fifo);
spin_unlock_irqrestore(&edge_port->ep_lock, flags);

if (!chars) {
ret = tx_active(edge_port);
if (ret > 0)
chars = ret;
}

dev_dbg(&port->dev, "%s - returns %d\n", __func__, chars);
return chars;
}
Expand Down

0 comments on commit 96b8c19

Please sign in to comment.