diff options
author | Felipe Balbi <balbi@ti.com> | 2011-12-19 11:03:57 +0100 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-02-28 13:49:08 +0100 |
commit | 05d00fbe87f185d55edf7461d4f714a3909bc908 (patch) | |
tree | 2fd3c1f6b834bc8ff4a212253c7c48062f6bb08d /drivers/usb/gadget/r8a66597-udc.c | |
parent | usb: gadget: amd5536: use generic map/unmap routines (diff) | |
download | linux-05d00fbe87f185d55edf7461d4f714a3909bc908.tar.xz linux-05d00fbe87f185d55edf7461d4f714a3909bc908.zip |
usb: gadget: r8a66597: use generic map/unmap routines
those routines have everything we need to map/unmap
USB requests and it's better to use them.
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/r8a66597-udc.c')
-rw-r--r-- | drivers/usb/gadget/r8a66597-udc.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/usb/gadget/r8a66597-udc.c b/drivers/usb/gadget/r8a66597-udc.c index f5b8d215e1d5..c4401e7dd3a6 100644 --- a/drivers/usb/gadget/r8a66597-udc.c +++ b/drivers/usb/gadget/r8a66597-udc.c @@ -663,11 +663,7 @@ static int sudmac_alloc_channel(struct r8a66597 *r8a66597, ep->fifoctr = D0FIFOCTR; /* dma mapping */ - req->req.dma = dma_map_single(r8a66597_to_dev(ep->r8a66597), - req->req.buf, req->req.length, - dma->dir ? DMA_TO_DEVICE : DMA_FROM_DEVICE); - - return 0; + return usb_gadget_map_request(&r8a66597->gadget, &req->req, dma->dir); } static void sudmac_free_channel(struct r8a66597 *r8a66597, @@ -677,9 +673,7 @@ static void sudmac_free_channel(struct r8a66597 *r8a66597, if (!r8a66597_is_sudmac(r8a66597)) return; - dma_unmap_single(r8a66597_to_dev(ep->r8a66597), - req->req.dma, req->req.length, - ep->dma->dir ? DMA_TO_DEVICE : DMA_FROM_DEVICE); + usb_gadget_unmap_request(&r8a66597->gadget, &req->req, ep->dma->dir); r8a66597_bclr(r8a66597, DREQE, ep->fifosel); r8a66597_change_curpipe(r8a66597, 0, 0, ep->fifosel); |