diff options
Diffstat (limited to 'include/linux/usb_gadget.h')
-rw-r--r-- | include/linux/usb_gadget.h | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/include/linux/usb_gadget.h b/include/linux/usb_gadget.h index e17186dbcdca..4f59b2aa8a9e 100644 --- a/include/linux/usb_gadget.h +++ b/include/linux/usb_gadget.h | |||
@@ -110,13 +110,6 @@ struct usb_ep_ops { | |||
110 | gfp_t gfp_flags); | 110 | gfp_t gfp_flags); |
111 | void (*free_request) (struct usb_ep *ep, struct usb_request *req); | 111 | void (*free_request) (struct usb_ep *ep, struct usb_request *req); |
112 | 112 | ||
113 | void *(*alloc_buffer) (struct usb_ep *ep, unsigned bytes, | ||
114 | dma_addr_t *dma, gfp_t gfp_flags); | ||
115 | void (*free_buffer) (struct usb_ep *ep, void *buf, dma_addr_t dma, | ||
116 | unsigned bytes); | ||
117 | // NOTE: on 2.6, drivers may also use dma_map() and | ||
118 | // dma_sync_single_*() to directly manage dma overhead. | ||
119 | |||
120 | int (*queue) (struct usb_ep *ep, struct usb_request *req, | 113 | int (*queue) (struct usb_ep *ep, struct usb_request *req, |
121 | gfp_t gfp_flags); | 114 | gfp_t gfp_flags); |
122 | int (*dequeue) (struct usb_ep *ep, struct usb_request *req); | 115 | int (*dequeue) (struct usb_ep *ep, struct usb_request *req); |
@@ -235,47 +228,6 @@ usb_ep_free_request (struct usb_ep *ep, struct usb_request *req) | |||
235 | } | 228 | } |
236 | 229 | ||
237 | /** | 230 | /** |
238 | * usb_ep_alloc_buffer - allocate an I/O buffer | ||
239 | * @ep:the endpoint associated with the buffer | ||
240 | * @len:length of the desired buffer | ||
241 | * @dma:pointer to the buffer's DMA address; must be valid | ||
242 | * @gfp_flags:GFP_* flags to use | ||
243 | * | ||
244 | * Returns a new buffer, or null if one could not be allocated. | ||
245 | * The buffer is suitably aligned for dma, if that endpoint uses DMA, | ||
246 | * and the caller won't have to care about dma-inconsistency | ||
247 | * or any hidden "bounce buffer" mechanism. No additional per-request | ||
248 | * DMA mapping will be required for such buffers. | ||
249 | * Free it later with usb_ep_free_buffer(). | ||
250 | * | ||
251 | * You don't need to use this call to allocate I/O buffers unless you | ||
252 | * want to make sure drivers don't incur costs for such "bounce buffer" | ||
253 | * copies or per-request DMA mappings. | ||
254 | */ | ||
255 | static inline void * | ||
256 | usb_ep_alloc_buffer (struct usb_ep *ep, unsigned len, dma_addr_t *dma, | ||
257 | gfp_t gfp_flags) | ||
258 | { | ||
259 | return ep->ops->alloc_buffer (ep, len, dma, gfp_flags); | ||
260 | } | ||
261 | |||
262 | /** | ||
263 | * usb_ep_free_buffer - frees an i/o buffer | ||
264 | * @ep:the endpoint associated with the buffer | ||
265 | * @buf:CPU view address of the buffer | ||
266 | * @dma:the buffer's DMA address | ||
267 | * @len:length of the buffer | ||
268 | * | ||
269 | * reverses the effect of usb_ep_alloc_buffer(). | ||
270 | * caller guarantees the buffer will no longer be accessed | ||
271 | */ | ||
272 | static inline void | ||
273 | usb_ep_free_buffer (struct usb_ep *ep, void *buf, dma_addr_t dma, unsigned len) | ||
274 | { | ||
275 | ep->ops->free_buffer (ep, buf, dma, len); | ||
276 | } | ||
277 | |||
278 | /** | ||
279 | * usb_ep_queue - queues (submits) an I/O request to an endpoint. | 231 | * usb_ep_queue - queues (submits) an I/O request to an endpoint. |
280 | * @ep:the endpoint associated with the request | 232 | * @ep:the endpoint associated with the request |
281 | * @req:the request being submitted | 233 | * @req:the request being submitted |