[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20091006150651.9431.16939.stgit@localhost.localdomain>
Date: Tue, 06 Oct 2009 16:06:57 +0100
From: Alan Cox <alan@...ux.intel.com>
To: greg@...ah.com, linux-kernel@...r.kernel.org,
linux-usb@...r.kernel.org
Subject: [PATCH 5/5] 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 <alan@...ux.intel.com>
---
drivers/usb/serial/opticon.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/usb/serial/opticon.c b/drivers/usb/serial/opticon.c
index c3a9ce2..4ff9e7a 100644
--- a/drivers/usb/serial/opticon.c
+++ b/drivers/usb/serial/opticon.c
@@ -499,7 +499,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;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists