From: Clemens Ladisch Date: Wed, 30 Mar 2005 14:22:01 +0000 (+0200) Subject: [ALSA] usb-audio - allow USB MIDI quirks to specify endpoints explicitly X-Git-Tag: v2.6.13-rc1~68^2~716 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c1ab5d59a0ff0981828a169886b10045dfdf64c6;p=linux-2.6 [ALSA] usb-audio - allow USB MIDI quirks to specify endpoints explicitly USB generic driver This patch reintroduces the check for endpoint numbers that are specified explicitly in the quirk structure. This check was accidentally dropped in the last rewrite of snd_usbmidi_detect_endpoints(). Signed-off-by: Clemens Ladisch --- diff --git a/sound/usb/usbmidi.c b/sound/usb/usbmidi.c index 5d32857ff9..600d990ddc 100644 --- a/sound/usb/usbmidi.c +++ b/sound/usb/usbmidi.c @@ -1229,6 +1229,9 @@ static int snd_usbmidi_detect_endpoints(snd_usb_midi_t* umidi, if (le16_to_cpu(umidi->chip->dev->descriptor.idVendor) == 0x0582) snd_usbmidi_switch_roland_altsetting(umidi); + if (endpoint[0].out_ep || endpoint[0].in_ep) + return 0; + intf = umidi->iface; if (!intf || intf->num_altsetting < 1) return -ENOENT;