summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelipe F. Tonello <eu@felipetonello.com>2016-08-08 21:30:07 +0100
committerFelipe Balbi <felipe.balbi@linux.intel.com>2016-08-25 12:13:14 +0300
commit4a655f152e7932e43356b683958200094b368d5a (patch)
tree6e74e7ccfdf7d71127e616b83fd4f0ee85cd33cf
parente0466156ee2e944fb47a3fa00932c3698a6d2c67 (diff)
downloadlinux-stable-4a655f152e7932e43356b683958200094b368d5a.tar.gz
linux-stable-4a655f152e7932e43356b683958200094b368d5a.tar.bz2
linux-stable-4a655f152e7932e43356b683958200094b368d5a.zip
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: Felipe F. Tonello <eu@felipetonello.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
-rw-r--r--drivers/usb/gadget/function/f_midi.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/usb/gadget/function/f_midi.c b/drivers/usb/gadget/function/f_midi.c
index 58fc199a18ec..39018dea7035 100644
--- a/drivers/usb/gadget/function/f_midi.c
+++ b/drivers/usb/gadget/function/f_midi.c
@@ -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;