Commit 79cc03df authored by Jaroslav Kysela's avatar Jaroslav Kysela Committed by Linus Torvalds

ALSA CVS update - Clemens Ladisch <clemens@ladisch.de>

USB generic driver
replace usage of interface index with calls to usb_ifnum_to_if (forgot this in 1.88)
parent 9ac26386
...@@ -2581,14 +2581,13 @@ static int create_composite_quirk(snd_usb_audio_t *chip, ...@@ -2581,14 +2581,13 @@ static int create_composite_quirk(snd_usb_audio_t *chip,
struct usb_interface *iface, struct usb_interface *iface,
const snd_usb_audio_quirk_t *quirk) const snd_usb_audio_quirk_t *quirk)
{ {
struct usb_host_config *config = chip->dev->actconfig;
int probed_ifnum = get_iface_desc(iface->altsetting)->bInterfaceNumber; int probed_ifnum = get_iface_desc(iface->altsetting)->bInterfaceNumber;
int err; int err;
for (quirk = quirk->data; quirk->ifnum >= 0; ++quirk) { for (quirk = quirk->data; quirk->ifnum >= 0; ++quirk) {
if (quirk->ifnum >= get_cfg_desc(config)->bNumInterfaces) iface = usb_ifnum_to_if(chip->dev, quirk->ifnum);
if (!iface)
continue; continue;
iface = get_iface(config, quirk->ifnum);
if (quirk->ifnum != probed_ifnum && if (quirk->ifnum != probed_ifnum &&
usb_interface_claimed(iface)) usb_interface_claimed(iface))
continue; continue;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment