Skip to content

Commit

Permalink
USB: omninet: fix write_room
Browse files Browse the repository at this point in the history
Fix regression introduced by commit 507ca9b ([PATCH] USB: add
ability for usb-serial drivers to determine if their write urb is
currently being used.) which inverted the logic in write_room so that it
returns zero when the write urb is actually free.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Johan Hovold authored and Greg Kroah-Hartman committed Nov 15, 2011
1 parent 14b54e3 commit 694c630
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/serial/omninet.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ static int omninet_write_room(struct tty_struct *tty)
int room = 0; /* Default: no room */

/* FIXME: no consistent locking for write_urb_busy */
if (wport->write_urb_busy)
if (!wport->write_urb_busy)
room = wport->bulk_out_size - OMNINET_HEADERLEN;

dbg("%s - returns %d", __func__, room);
Expand Down

0 comments on commit 694c630

Please sign in to comment.