[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1373533573-12272-16-git-send-email-ming.lei@canonical.com>
Date: Thu, 11 Jul 2013 17:05:38 +0800
From: Ming Lei <ming.lei@...onical.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: linux-usb@...r.kernel.org, Oliver Neukum <oliver@...kum.org>,
Alan Stern <stern@...land.harvard.edu>,
linux-input@...r.kernel.org, linux-bluetooth@...r.kernel.org,
netdev@...r.kernel.org, linux-wireless@...r.kernel.org,
linux-media@...r.kernel.org, alsa-devel@...a-project.org,
Ming Lei <ming.lei@...onical.com>,
Johan Hovold <jhovold@...il.com>
Subject: [PATCH 15/50] USB: serial: mos77840: spin_lock in complete() cleanup
Complete() will be run with interrupt enabled, so change to
spin_lock_irqsave().
Cc: Johan Hovold <jhovold@...il.com>
Signed-off-by: Ming Lei <ming.lei@...onical.com>
---
drivers/usb/serial/mos7840.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c
index 0a818b2..f21dcd0 100644
--- a/drivers/usb/serial/mos7840.c
+++ b/drivers/usb/serial/mos7840.c
@@ -788,17 +788,18 @@ static void mos7840_bulk_out_data_callback(struct urb *urb)
struct usb_serial_port *port;
int status = urb->status;
int i;
+ unsigned long flags;
mos7840_port = urb->context;
port = mos7840_port->port;
- spin_lock(&mos7840_port->pool_lock);
+ spin_lock_irqsave(&mos7840_port->pool_lock, flags);
for (i = 0; i < NUM_URBS; i++) {
if (urb == mos7840_port->write_urb_pool[i]) {
mos7840_port->busy[i] = 0;
break;
}
}
- spin_unlock(&mos7840_port->pool_lock);
+ spin_unlock_irqrestore(&mos7840_port->pool_lock, flags);
if (status) {
dev_dbg(&port->dev, "nonzero write bulk status received:%d\n", status);
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists