USB: gadget: f_midi: allow a dynamic number of input and output ports
authorDaniel Mack <zonque@gmail.com>
Wed, 28 Sep 2011 14:41:34 +0000 (16:41 +0200)
committerFelipe Balbi <balbi@ti.com>
Thu, 13 Oct 2011 17:39:52 +0000 (20:39 +0300)
commitc8933c3f79568263c90a46f06cf80419e6c63c97
treef2e47dc624e9f5aa5e8e6a5b9907dc157dd0e7bb
parent2672eea5a38b35e6d28f851e990e110e217271eb
USB: gadget: f_midi: allow a dynamic number of input and output ports

The code in the MIDI gadget was already sort of prepared for multi-port
configuration, so the streaming logic itself didn't need much tweaking.
However, the descriptors change when the number of ports do, and so some
rework of the the preparation algorithms were necessary.

Successfully tested on Linux and Max OS X hosts for both input and
output streams.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/f_midi.c
drivers/usb/gadget/gmidi.c