usb: gadget: f_midi: drop substreams when disabling endpoint
authorFelipe F. Tonello <eu@felipetonello.com>
Mon, 8 Aug 2016 20:30:10 +0000 (21:30 +0100)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Thu, 25 Aug 2016 09:13:15 +0000 (12:13 +0300)
commitf8ca46aeb7b422b8c22e286e25269e4fefc560bd
treef94bccaf6223c8255ac00919c9700032686ea18d
parentf42ab18cc8aed6b5a3532c468f99285de9eabab5
usb: gadget: f_midi: drop substreams when disabling endpoint

This change makes sure that the ALSA buffers are cleaned if an endpoint
becomes disabled.

Before this change, if the internal ALSA buffer did overflow, the MIDI
function would stop sending MIDI to the host.

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