usb: gadget: midi: Fix deadlock unbinding driver while it is in use

Using snd_card_free_when_closed rather than snd_card_free in f_midi_unbind
makes it safe to disable the driver while a userspace client has the
ALSA device open.

Change-Id: I4358f26440c241f95cb6355dc48a494ba91edf82
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-3353
Signed-off-by: Mike Lockwood <lockwood@google.com>
Signed-off-by: Mian Yousaf Kaukab <yousaf.kaukab@intel.com>
1 file changed