summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorJerry Zhang <zhangjerry@google.com>2017-08-14 14:14:51 -0700
committerFelipe Balbi <felipe.balbi@linux.intel.com>2017-08-15 14:18:47 +0300
commit2d19cdc1cb7ab00003fccb951d6199b8d8c9ac67 (patch)
treea760bb4578621387011ecf34b5a2235904df2325 /tools/perf/scripts/python/export-to-postgresql.py
parent24cf34595d560de0d8eccd6617b7ca5b4ef93d3e (diff)
usb: gadget: f_midi: Use snd_card_free_when_closed with refcount
Currenly, f_midi_free uses snd_card_free, which will wait until the user has released the sound card before returning. However, if the user doesn't release the sound card, then f_midi_free can block for an arbitrary amount of time, which also blocks any gadget operations on that thread. Instead, we can use snd_card_free_when_closed which returns before all handles are released. Since f_midi can be accessed through rmidi if usb_put_function is called before release_card_device, add refcounting to f_midi_free and have rawmidi's private free call it. The f_midi memory is only kfreed when usb_put_function and release_card_device have both been called. Signed-off-by: Jerry Zhang <zhangjerry@google.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions