Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 303814
b: refs/heads/master
c: 4f06539
h: refs/heads/master
v: v3
  • Loading branch information
Peter Korsgaard authored and Felipe Balbi committed May 4, 2012
1 parent a4d8369 commit 96b7161
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b4036ccdd2ce5ec0c4f29b91312dd3cf19fc9152
refs/heads/master: 4f06539ffa1948f1d2623f549136c87e33dc1d75
14 changes: 14 additions & 0 deletions trunk/drivers/usb/gadget/f_fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1473,8 +1473,22 @@ static int functionfs_bind_config(struct usb_composite_dev *cdev,

static void ffs_func_free(struct ffs_function *func)
{
struct ffs_ep *ep = func->eps;
unsigned count = func->ffs->eps_count;
unsigned long flags;

ENTER();

/* cleanup after autoconfig */
spin_lock_irqsave(&func->ffs->eps_lock, flags);
do {
if (ep->ep && ep->req)
usb_ep_free_request(ep->ep, ep->req);
ep->req = NULL;
++ep;
} while (--count);
spin_unlock_irqrestore(&func->ffs->eps_lock, flags);

ffs_data_put(func->ffs);

kfree(func->eps);
Expand Down

0 comments on commit 96b7161

Please sign in to comment.