[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1373533573-12272-22-git-send-email-ming.lei@canonical.com>
Date: Thu, 11 Jul 2013 17:05:44 +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>,
Jiri Kosina <jkosina@...e.cz>
Subject: [PATCH 21/50] hid: usbhid: spin_lock in complete() cleanup
Complete() will be run with interrupt enabled, so change to
spin_lock_irqsave().
Cc: Jiri Kosina <jkosina@...e.cz>
Cc: linux-input@...r.kernel.org
Signed-off-by: Ming Lei <ming.lei@...onical.com>
---
drivers/hid/usbhid/hid-core.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c
index 9941828..e1d8518 100644
--- a/drivers/hid/usbhid/hid-core.c
+++ b/drivers/hid/usbhid/hid-core.c
@@ -489,8 +489,9 @@ static void hid_ctrl(struct urb *urb)
struct hid_device *hid = urb->context;
struct usbhid_device *usbhid = hid->driver_data;
int unplug = 0, status = urb->status;
+ unsigned long flags;
- spin_lock(&usbhid->lock);
+ spin_lock_irqsave(&usbhid->lock, flags);
switch (status) {
case 0: /* success */
@@ -525,7 +526,7 @@ static void hid_ctrl(struct urb *urb)
}
clear_bit(HID_CTRL_RUNNING, &usbhid->iofl);
- spin_unlock(&usbhid->lock);
+ spin_unlock_irqrestore(&usbhid->lock, flags);
usb_autopm_put_interface_async(usbhid->intf);
wake_up(&usbhid->wait);
}
--
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