USB: gadget: midi: Fix deadlock unbinding driver while it is in use
authorMike Lockwood <lockwood@google.com>
Thu, 29 Jan 2015 21:37:06 +0000 (13:37 -0800)
committerMike Lockwood <lockwood@google.com>
Mon, 16 Mar 2015 17:51:35 +0000 (10:51 -0700)
commit261230ce54cfc119efe643fc1d128e431d1678d3
treeca16a89e44235f781cdd62e730b12efe3dcd293b
parent4be5c6a45a26cdfa7f6ad4a3c01cb69781f37535
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: Ibc40c01e7b1ce90fc61d3ea654b4816fadfc7ffd
Signed-off-by: Mike Lockwood <lockwood@google.com>
drivers/usb/gadget/f_midi.c