]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
usb: gadget: f_midi: remove alignment code for OUT endpoint
authorFelipe F. Tonello <eu@felipetonello.com>
Mon, 8 Aug 2016 20:30:07 +0000 (21:30 +0100)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Thu, 25 Aug 2016 09:13:14 +0000 (12:13 +0300)
The new version of alloc_ep_req() already aligns the buffer size to
wMaxPacketSize on OUT endpoints.

Signed-off-by: Felipe F. Tonello <eu@felipetonello.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/gadget/function/f_midi.c

index 58fc199a18ecd735021796ed4c352f7f728d0e22..39018dea70356a3292e38f148ff1a0f07dd46d95 100644 (file)
@@ -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;