Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 289637
b: refs/heads/master
c: 249a456
h: refs/heads/master
i:
  289635: 5ad9864
v: v3
  • Loading branch information
Paul Zimmerman authored and Felipe Balbi committed Mar 2, 2012
1 parent f17c04b commit a1ef6d5
Show file tree
Hide file tree
Showing 2 changed files with 8 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: aee63e3cb6b0396b99c6387a47cb90a7417f3957
refs/heads/master: 249a456930cd2df29d085fb738b0e8f4bc1680cf
7 changes: 7 additions & 0 deletions trunk/drivers/usb/dwc3/gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -1196,8 +1196,12 @@ static int dwc3_gadget_ep_set_halt(struct usb_ep *ep, int value)
static int dwc3_gadget_ep_set_wedge(struct usb_ep *ep)
{
struct dwc3_ep *dep = to_dwc3_ep(ep);
struct dwc3 *dwc = dep->dwc;
unsigned long flags;

spin_lock_irqsave(&dwc->lock, flags);
dep->flags |= DWC3_EP_WEDGE;
spin_unlock_irqrestore(&dwc->lock, flags);

return dwc3_gadget_ep_set_halt(ep, 1);
}
Expand Down Expand Up @@ -1323,8 +1327,11 @@ static int dwc3_gadget_set_selfpowered(struct usb_gadget *g,
int is_selfpowered)
{
struct dwc3 *dwc = gadget_to_dwc(g);
unsigned long flags;

spin_lock_irqsave(&dwc->lock, flags);
dwc->is_selfpowered = !!is_selfpowered;
spin_unlock_irqrestore(&dwc->lock, flags);

return 0;
}
Expand Down

0 comments on commit a1ef6d5

Please sign in to comment.