Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1467433
| From | Felipe Balbi <balbi@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v4 10/10] usb: gadget: f_hid: use alloc_ep_req() |
| Date | 2016-08-22 10:00 +0200 |
| Message-ID | <s8Sjg-3ra-15@gated-at.bofh.it> (permalink) |
| References | <s3Zv3-6cB-3@gated-at.bofh.it> <s3Zv3-6cB-27@gated-at.bofh.it> <s7XuF-1cK-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
Hi, John Youn <John.Youn@synopsys.com> writes: > On 8/8/2016 1:30 PM, Felipe F. Tonello wrote: >> Use gadget's framework allocation function instead of directly calling >> usb_ep_alloc_request(). >> >> Signed-off-by: Felipe F. Tonello <eu@felipetonello.com> >> --- >> drivers/usb/gadget/function/f_hid.c | 6 +----- >> 1 file changed, 1 insertion(+), 5 deletions(-) >> >> diff --git a/drivers/usb/gadget/function/f_hid.c b/drivers/usb/gadget/function/f_hid.c >> index a010496e4e05..89d2e9a5a04f 100644 >> --- a/drivers/usb/gadget/function/f_hid.c >> +++ b/drivers/usb/gadget/function/f_hid.c >> @@ -611,14 +611,10 @@ static int hidg_bind(struct usb_configuration *c, struct usb_function *f) >> >> /* preallocate request and buffer */ >> status = -ENOMEM; >> - hidg->req = usb_ep_alloc_request(hidg->in_ep, GFP_KERNEL); >> + hidg->req = alloc_ep_req(hidg->in_ep, hidg->report_length); >> if (!hidg->req) >> goto fail; >> >> - hidg->req->buf = kmalloc(hidg->report_length, GFP_KERNEL); >> - if (!hidg->req->buf) >> - goto fail; >> - >> /* set descriptor dynamic values */ >> hidg_interface_desc.bInterfaceSubClass = hidg->bInterfaceSubClass; >> hidg_interface_desc.bInterfaceProtocol = hidg->bInterfaceProtocol; >> > > Hi Felipe, > > This commit on your testing/next breaks compilation. > > ../drivers/usb/gadget/function/f_hid.c: In function ‘hidg_bind’: > ../drivers/usb/gadget/function/f_hid.c:620:14: error: too few arguments to function ‘alloc_ep_req’ > hidg->req = alloc_ep_req(hidg->in_ep, hidg->report_length); > ^ > In file included from ../drivers/usb/gadget/function/f_hid.c:24:0: > ../drivers/usb/gadget/u_f.h:63:21: note: declared here > struct usb_request *alloc_ep_req(struct usb_ep *ep, size_t len, int default_len); true that :-) Dropping from my queue. -- balbi
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH v4 10/10] usb: gadget: f_hid: use alloc_ep_req() John Youn <John.Youn@synopsys.com> - 2016-08-19 21:20 +0200
Re: [PATCH v4 10/10] usb: gadget: f_hid: use alloc_ep_req() Felipe Balbi <balbi@kernel.org> - 2016-08-22 10:00 +0200
Re: [PATCH v4 10/10] usb: gadget: f_hid: use alloc_ep_req() Felipe Ferreri Tonello <eu@felipetonello.com> - 2016-08-23 12:30 +0200
Re: [PATCH v4 10/10] usb: gadget: f_hid: use alloc_ep_req() Felipe Balbi <balbi@kernel.org> - 2016-08-23 13:10 +0200
Re: [PATCH v4 10/10] usb: gadget: f_hid: use alloc_ep_req() Felipe Ferreri Tonello <eu@felipetonello.com> - 2016-08-23 13:40 +0200
csiph-web