Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1f45a4ba authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: gadget: f_hid: use alloc_ep_req()"

parents c05d4dd4 66823b1c
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -633,14 +633,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;