Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 325876
b: refs/heads/master
c: 4fefe9f
h: refs/heads/master
v: v3
  • Loading branch information
Michael Grzeschik authored and Felipe Balbi committed Aug 23, 2012
1 parent 4f5bbda commit 08fb174
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 11c37c8b64b9d9d4ab19d387e6028eee3ec188d3
refs/heads/master: 4fefe9f6de3d6e0b5e58b17cbab9c47c74f88cb6
5 changes: 3 additions & 2 deletions trunk/drivers/usb/gadget/composite.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,9 +300,10 @@ int usb_function_deactivate(struct usb_function *function)
int usb_function_activate(struct usb_function *function)
{
struct usb_composite_dev *cdev = function->config->cdev;
unsigned long flags;
int status = 0;

spin_lock(&cdev->lock);
spin_lock_irqsave(&cdev->lock, flags);

if (WARN_ON(cdev->deactivations == 0))
status = -EINVAL;
Expand All @@ -312,7 +313,7 @@ int usb_function_activate(struct usb_function *function)
status = usb_gadget_connect(cdev->gadget);
}

spin_unlock(&cdev->lock);
spin_unlock_irqrestore(&cdev->lock, flags);
return status;
}

Expand Down

0 comments on commit 08fb174

Please sign in to comment.