diff options
author | Johan Hovold <jhovold@gmail.com> | 2011-11-06 13:06:21 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-11-15 13:33:10 -0500 |
commit | 694c6301e515bad574af74b6552134c4d9dcb334 (patch) | |
tree | 42553bd4038b49080e218da07786997209886bc6 /drivers/usb/serial/omninet.c | |
parent | 14b54e39b4121f679376d4175682fe47a9a86447 (diff) |
USB: omninet: fix write_room
Fix regression introduced by commit 507ca9bc047666 ([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>
Diffstat (limited to 'drivers/usb/serial/omninet.c')
-rw-r--r-- | drivers/usb/serial/omninet.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/serial/omninet.c b/drivers/usb/serial/omninet.c index 6d7c56d0cb61..6e976649fcae 100644 --- a/drivers/usb/serial/omninet.c +++ b/drivers/usb/serial/omninet.c | |||
@@ -290,7 +290,7 @@ static int omninet_write_room(struct tty_struct *tty) | |||
290 | int room = 0; /* Default: no room */ | 290 | int room = 0; /* Default: no room */ |
291 | 291 | ||
292 | /* FIXME: no consistent locking for write_urb_busy */ | 292 | /* FIXME: no consistent locking for write_urb_busy */ |
293 | if (wport->write_urb_busy) | 293 | if (!wport->write_urb_busy) |
294 | room = wport->bulk_out_size - OMNINET_HEADERLEN; | 294 | room = wport->bulk_out_size - OMNINET_HEADERLEN; |
295 | 295 | ||
296 | dbg("%s - returns %d", __func__, room); | 296 | dbg("%s - returns %d", __func__, room); |