Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 361631
b: refs/heads/master
c: 06d9db7
h: refs/heads/master
i:
  361629: a88c690
  361627: bfa547c
  361623: 1208184
  361615: 4bbc9a7
  361599: 445f1b1
v: v3
  • Loading branch information
Kishon Vijay Abraham I authored and Felipe Balbi committed Mar 18, 2013
1 parent 11e0318 commit 30f0d2b
Show file tree
Hide file tree
Showing 2 changed files with 8 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: 273daf2f2ab9f42d82f017b20fcf902ec8d7cffa
refs/heads/master: 06d9db7273c7bd5b07624b313faeea57a4b31056
9 changes: 7 additions & 2 deletions trunk/drivers/usb/musb/musb_gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,9 @@ static inline void map_dma_buffer(struct musb_request *request,
static inline void unmap_dma_buffer(struct musb_request *request,
struct musb *musb)
{
if (!is_buffer_mapped(request))
struct musb_ep *musb_ep = request->ep;

if (!is_buffer_mapped(request) || !musb_ep->dma)
return;

if (request->request.dma == DMA_ADDR_INVALID) {
Expand Down Expand Up @@ -195,7 +197,10 @@ __acquires(ep->musb->lock)

ep->busy = 1;
spin_unlock(&musb->lock);
unmap_dma_buffer(req, musb);

if (!dma_mapping_error(&musb->g.dev, request->dma))
unmap_dma_buffer(req, musb);

if (request->status == 0)
dev_dbg(musb->controller, "%s done request %p, %d/%d\n",
ep->end_point.name, request,
Expand Down

0 comments on commit 30f0d2b

Please sign in to comment.