opticon: Fix resume logic

Opticon now takes the right mutex to check the port status but the status
check is done wrongly for the modern serial code, so fix it.

Signed-off-by: Alan Cox <[email protected]>
Cc: Alan Stern <[email protected]>
Cc: Oliver Neukum <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
Alan Cox 2009-10-06 16:06:57 +01:00 • committed by Greg Kroah-Hartman
commit 2a0785ea37

View file

@ -502,7 +502,8 @@ static int opticon_resume(struct usb_interface *intf)
int result;
mutex_lock(&port->port.mutex);
if (port->port.count)
/* This is protected by the port mutex against close/open */
if (test_bit(ASYNCB_INITIALIZED, &port->port.flags))
result = usb_submit_urb(priv->bulk_read_urb, GFP_NOIO);
else
result = 0;