Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 133532
b: refs/heads/master
c: b2bdf3a
h: refs/heads/master
v: v3
  • Loading branch information
Felipe Balbi authored and Greg Kroah-Hartman committed Mar 24, 2009
1 parent 11d1610 commit 3765e40
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: 6da9c99059bf24fb1faae6b9613bae64ea50c05e
refs/heads/master: b2bdf3a789162aa6ff9c6f139bee9cc7954bc5b4
5 changes: 3 additions & 2 deletions trunk/drivers/usb/gadget/composite.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,16 +149,17 @@ int __init usb_add_function(struct usb_configuration *config,
int usb_function_deactivate(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 (cdev->deactivations == 0)
status = usb_gadget_disconnect(cdev->gadget);
if (status == 0)
cdev->deactivations++;

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

Expand Down

0 comments on commit 3765e40

Please sign in to comment.