diff options
author | David Brownell <david-b@pacbell.net> | 2007-07-01 12:21:00 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-07-12 16:34:42 -0700 |
commit | c67ab134ba9f83f9de86e58adfeaa14a9efa6e00 (patch) | |
tree | df9022b4a38e955abbf254d71e00ac1fecce6420 /drivers/usb/gadget/pxa2xx_udc.c | |
parent | 9d8bab58b758cd5a96d368a8cc64111c9ab50407 (diff) |
usb gadget stack: remove usb_ep_*_buffer(), part 2
This patch removes controller driver infrastructure which supported
the now-removed usb_ep_{alloc,free}_buffer() calls.
As can be seen, many of the implementations of this were broken to
various degrees. Many didn't properly return dma-coherent mappings;
those which did so were necessarily ugly because of bogosity in the
underlying dma_free_coherent() calls ... which on many platforms
can't be called from the same contexts (notably in_irq) from which
their dma_alloc_coherent() sibling can be called.
The main potential downside of removing this is that gadget drivers
wouldn't have specific knowledge that the controller drivers have:
endpoints that aren't dma-capable don't need any dma mappings at all.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget/pxa2xx_udc.c')
-rw-r--r-- | drivers/usb/gadget/pxa2xx_udc.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/drivers/usb/gadget/pxa2xx_udc.c b/drivers/usb/gadget/pxa2xx_udc.c index 484de6e97662..63b9521c1322 100644 --- a/drivers/usb/gadget/pxa2xx_udc.c +++ b/drivers/usb/gadget/pxa2xx_udc.c @@ -341,26 +341,6 @@ pxa2xx_ep_free_request (struct usb_ep *_ep, struct usb_request *_req) kfree(req); } - -static void * -pxa2xx_ep_alloc_buffer(struct usb_ep *_ep, unsigned bytes, - dma_addr_t *dma, gfp_t gfp_flags) -{ - char *retval; - - retval = kmalloc (bytes, gfp_flags & ~(__GFP_DMA|__GFP_HIGHMEM)); - if (retval) - *dma = (dma_addr_t)~0; - return retval; -} - -static void -pxa2xx_ep_free_buffer(struct usb_ep *_ep, void *buf, dma_addr_t dma, - unsigned bytes) -{ - kfree (buf); -} - /*-------------------------------------------------------------------------*/ /* @@ -927,9 +907,6 @@ static struct usb_ep_ops pxa2xx_ep_ops = { .alloc_request = pxa2xx_ep_alloc_request, .free_request = pxa2xx_ep_free_request, - .alloc_buffer = pxa2xx_ep_alloc_buffer, - .free_buffer = pxa2xx_ep_free_buffer, - .queue = pxa2xx_ep_queue, .dequeue = pxa2xx_ep_dequeue, |