aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2011-09-08 11:16:21 -0400
committerFelipe Balbi <balbi@ti.com>2011-09-09 06:05:26 -0400
commitbb7ea2841e9c8669ac31e4262f585729bf779bff (patch)
tree16e8eab49bf4c834c587b40f7bfbef5986e2f021 /drivers
parent771f184ecebf34929a849eaa707aa463234254f7 (diff)
usb: dwc3: gadget: drop the useless dma_sync_single* calls
if req->dma isn't DMA_ADDR_INVALID it means gadget driver mapped the request or allocated from coherent, so it's unnecessary to do anything. Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/dwc3/gadget.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 6c64c7385314..2ea2fc86390d 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -71,11 +71,6 @@ void dwc3_map_buffer_to_dma(struct dwc3_request *req)
71 req->request.length, req->direction 71 req->request.length, req->direction
72 ? DMA_TO_DEVICE : DMA_FROM_DEVICE); 72 ? DMA_TO_DEVICE : DMA_FROM_DEVICE);
73 req->mapped = true; 73 req->mapped = true;
74 } else {
75 dma_sync_single_for_device(dwc->dev, req->request.dma,
76 req->request.length, req->direction
77 ? DMA_TO_DEVICE : DMA_FROM_DEVICE);
78 req->mapped = false;
79 } 74 }
80} 75}
81 76
@@ -94,10 +89,6 @@ void dwc3_unmap_buffer_from_dma(struct dwc3_request *req)
94 ? DMA_TO_DEVICE : DMA_FROM_DEVICE); 89 ? DMA_TO_DEVICE : DMA_FROM_DEVICE);
95 req->mapped = 0; 90 req->mapped = 0;
96 req->request.dma = DMA_ADDR_INVALID; 91 req->request.dma = DMA_ADDR_INVALID;
97 } else {
98 dma_sync_single_for_cpu(dwc->dev, req->request.dma,
99 req->request.length, req->direction
100 ? DMA_TO_DEVICE : DMA_FROM_DEVICE);
101 } 92 }
102} 93}
103 94