summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid Brownell <david-b@pacbell.net>2007-07-01 11:04:54 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2007-07-12 16:34:42 -0700
commit9d8bab58b758cd5a96d368a8cc64111c9ab50407 (patch)
tree710695adf1e50f2e4680c130d548ccd3e6251630 /include
parentad8c623f4f48085edd51c7f4cdfd10295547bf45 (diff)
downloadlinux-3.10-9d8bab58b758cd5a96d368a8cc64111c9ab50407.tar.gz
linux-3.10-9d8bab58b758cd5a96d368a8cc64111c9ab50407.tar.bz2
linux-3.10-9d8bab58b758cd5a96d368a8cc64111c9ab50407.zip
usb gadget stack: remove usb_ep_*_buffer(), part 1
Remove usb_ep_{alloc,free}_buffer() calls, for small dma-coherent buffers. This patch just removes the interface and its users; later patches will remove controller driver support. - This interface is invariably not implemented correctly in the controller drivers (e.g. using dma pools, a mechanism which post-dates the interface by several years). - At this point no gadget driver really *needs* to use it. In current kernels, any driver that needs such a mechanism could allocate a dma pool themselves. Removing this interface is thus a simplification and improvement. Note that the gmidi.c driver had a bug in this area; fixed. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include')
-rw-r--r--include/linux/usb_gadget.h41
1 files changed, 0 insertions, 41 deletions
diff --git a/include/linux/usb_gadget.h b/include/linux/usb_gadget.h
index e17186dbcdc..703fd84c46f 100644
--- a/include/linux/usb_gadget.h
+++ b/include/linux/usb_gadget.h
@@ -235,47 +235,6 @@ usb_ep_free_request (struct usb_ep *ep, struct usb_request *req)
}
/**
- * usb_ep_alloc_buffer - allocate an I/O buffer
- * @ep:the endpoint associated with the buffer
- * @len:length of the desired buffer
- * @dma:pointer to the buffer's DMA address; must be valid
- * @gfp_flags:GFP_* flags to use
- *
- * Returns a new buffer, or null if one could not be allocated.
- * The buffer is suitably aligned for dma, if that endpoint uses DMA,
- * and the caller won't have to care about dma-inconsistency
- * or any hidden "bounce buffer" mechanism. No additional per-request
- * DMA mapping will be required for such buffers.
- * Free it later with usb_ep_free_buffer().
- *
- * You don't need to use this call to allocate I/O buffers unless you
- * want to make sure drivers don't incur costs for such "bounce buffer"
- * copies or per-request DMA mappings.
- */
-static inline void *
-usb_ep_alloc_buffer (struct usb_ep *ep, unsigned len, dma_addr_t *dma,
- gfp_t gfp_flags)
-{
- return ep->ops->alloc_buffer (ep, len, dma, gfp_flags);
-}
-
-/**
- * usb_ep_free_buffer - frees an i/o buffer
- * @ep:the endpoint associated with the buffer
- * @buf:CPU view address of the buffer
- * @dma:the buffer's DMA address
- * @len:length of the buffer
- *
- * reverses the effect of usb_ep_alloc_buffer().
- * caller guarantees the buffer will no longer be accessed
- */
-static inline void
-usb_ep_free_buffer (struct usb_ep *ep, void *buf, dma_addr_t dma, unsigned len)
-{
- ep->ops->free_buffer (ep, buf, dma, len);
-}
-
-/**
* usb_ep_queue - queues (submits) an I/O request to an endpoint.
* @ep:the endpoint associated with the request
* @req:the request being submitted