From: Daniel Mack Date: Wed, 25 May 2011 07:08:59 +0000 (+0200) Subject: ALSA: usb-audio: move assignment of chip->ctrl_intf X-Git-Tag: upstream/snapshot3+hdmi~10060^2~1^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5875c2cb7633ca280c2ece43389d6a6f3c00e951;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git ALSA: usb-audio: move assignment of chip->ctrl_intf This is needed for upcoming changes to the quirks mechanism. Signed-off-by: Daniel Mack Signed-off-by: Takashi Iwai --- diff --git a/sound/usb/card.c b/sound/usb/card.c index a90662a..84a5ce7 100644 --- a/sound/usb/card.c +++ b/sound/usb/card.c @@ -492,14 +492,6 @@ static void *snd_usb_audio_probe(struct usb_device *dev, } } - chip->txfr_quirk = 0; - err = 1; /* continue */ - if (quirk && quirk->ifnum != QUIRK_NO_INTERFACE) { - /* need some special handlings */ - if ((err = snd_usb_create_quirk(chip, intf, &usb_audio_driver, quirk)) < 0) - goto __error; - } - /* * For devices with more than one control interface, we assume the * first contains the audio controls. We might need a more specific @@ -508,6 +500,14 @@ static void *snd_usb_audio_probe(struct usb_device *dev, if (!chip->ctrl_intf) chip->ctrl_intf = alts; + chip->txfr_quirk = 0; + err = 1; /* continue */ + if (quirk && quirk->ifnum != QUIRK_NO_INTERFACE) { + /* need some special handlings */ + if ((err = snd_usb_create_quirk(chip, intf, &usb_audio_driver, quirk)) < 0) + goto __error; + } + if (err > 0) { /* create normal USB audio interfaces */ if (snd_usb_create_streams(chip, ifnum) < 0 ||