summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Theissen <alex.theissen@me.com>2018-12-05 01:43:37 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-12-05 12:42:25 +0300
commit3ea5eb139f43360ae2d471e975b82d3fa38929c8 (patch)
tree6c916f1d2d726ec77e3130c44fda69edf1394954
parent67f3a0d0ad7220b9c37b5e6722a821cd7f389b39 (diff)
downloadlinux-3ea5eb139f43360ae2d471e975b82d3fa38929c8.tar.xz
usb: appledisplay: Remove unnecessary spinlock
The spinlock was inside the urb completion function which is only called once per display and is then resubmitted from this function. There was no other place where this lock was used. Signed-off-by: Alexander Theissen <alex.theissen@me.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/misc/appledisplay.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/usb/misc/appledisplay.c b/drivers/usb/misc/appledisplay.c
index 730a266cd7b9..8859cd968be9 100644
--- a/drivers/usb/misc/appledisplay.c
+++ b/drivers/usb/misc/appledisplay.c
@@ -68,7 +68,6 @@ struct appledisplay {
struct delayed_work work;
int button_pressed;
- spinlock_t lock;
struct mutex sysfslock; /* concurrent read and write */
};
@@ -78,7 +77,6 @@ static void appledisplay_complete(struct urb *urb)
{
struct appledisplay *pdata = urb->context;
struct device *dev = &pdata->udev->dev;
- unsigned long flags;
int status = urb->status;
int retval;
@@ -104,8 +102,6 @@ static void appledisplay_complete(struct urb *urb)
goto exit;
}
- spin_lock_irqsave(&pdata->lock, flags);
-
switch(pdata->urbdata[1]) {
case ACD_BTN_BRIGHT_UP:
case ACD_BTN_BRIGHT_DOWN:
@@ -118,8 +114,6 @@ static void appledisplay_complete(struct urb *urb)
break;
}
- spin_unlock_irqrestore(&pdata->lock, flags);
-
exit:
retval = usb_submit_urb(pdata->urb, GFP_ATOMIC);
if (retval) {
@@ -228,7 +222,6 @@ static int appledisplay_probe(struct usb_interface *iface,
pdata->udev = udev;
- spin_lock_init(&pdata->lock);
INIT_DELAYED_WORK(&pdata->work, appledisplay_work);
mutex_init(&pdata->sysfslock);