From: Johan Hovold Date: Sun, 6 Nov 2011 18:06:21 +0000 (+0100) Subject: USB: omninet: fix write_room X-Git-Tag: MMI-PSA29.97-13-9~17726^2~86 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=694c6301e515bad574af74b6552134c4d9dcb334;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 Cc: stable Signed-off-by: Greg Kroah-Hartman --- 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) 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);