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

Commit 4a655f15 authored by Felipe F. Tonello's avatar Felipe F. Tonello Committed by Felipe Balbi
Browse files

usb: gadget: f_midi: remove alignment code for OUT endpoint



The new version of alloc_ep_req() already aligns the buffer size to
wMaxPacketSize on OUT endpoints.

Signed-off-by: default avatarFelipe F. Tonello <eu@felipetonello.com>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent e0466156
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -360,9 +360,8 @@ static int f_midi_set_alt(struct usb_function *f, unsigned intf, unsigned alt)
	/* allocate a bunch of read buffers and queue them all at once. */
	for (i = 0; i < midi->qlen && err == 0; i++) {
		struct usb_request *req =
			midi_alloc_ep_req(midi->out_ep,
				max_t(unsigned, midi->buflen,
					bulk_out_desc.wMaxPacketSize));
			midi_alloc_ep_req(midi->out_ep, midi->buflen);

		if (req == NULL)
			return -ENOMEM;