This source file includes following definitions.
- alloc_ep_req
1
2
3
4
5
6
7
8
9
10
11 #include "u_f.h"
12 #include <linux/usb/ch9.h>
13
14 struct usb_request *alloc_ep_req(struct usb_ep *ep, size_t len)
15 {
16 struct usb_request *req;
17
18 req = usb_ep_alloc_request(ep, GFP_ATOMIC);
19 if (req) {
20 req->length = usb_endpoint_dir_out(ep->desc) ?
21 usb_ep_align(ep, len) : len;
22 req->buf = kmalloc(req->length, GFP_ATOMIC);
23 if (!req->buf) {
24 usb_ep_free_request(ep, req);
25 req = NULL;
26 }
27 }
28 return req;
29 }
30 EXPORT_SYMBOL_GPL(alloc_ep_req);