]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: ua101, usx2y: fix broken MIDI output
authorClemens Ladisch <clemens@ladisch.de>
Wed, 31 Oct 2012 15:35:30 +0000 (16:35 +0100)
committerClemens Ladisch <clemens@ladisch.de>
Sun, 18 Nov 2012 16:15:24 +0000 (17:15 +0100)
commite8a94aa4497ef40686003930a251143242b48341
treebd190112eb0dad7aa3222ff86ebeb8cf4ab68ec7
parentcec3ab8d456d1d2dab9b60fb279125e4f7315d31
ALSA: ua101, usx2y: fix broken MIDI output

Commit b3d6ab02b6e1 (ALSA: usbaudio: implement USB autosuspend) added
autosuspend code to all files making up the snd-usb-audio driver.
However, midi.c is part of snd-usb-lib and is also used by other
drivers, not all of which support autosuspend.  Thus, calls to
usb_autopm_get_interface() could fail, and this unexpected error would
result in the MIDI output being completely unusable.

Make it work by ignoring the error that is expected with drivers that do
not support autosuspend.

Reported-by: Colin Fletcher <colin.m.fletcher@googlemail.com>
Reported-by: Devin Venable <venable.devin@gmail.com>
Reported-by: Dr Nick Bailey <nicholas.bailey@glasgow.ac.uk>
Reported-by: Jannis Achstetter <jannis_achstetter@web.de>
Reported-by: Rui Nuno Capela <rncbc@rncbc.org>
Cc: Oliver Neukum <oliver@neukum.org>
Cc: 2.6.39+ <stable@vger.kernel.org>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
sound/usb/midi.c