Commit 76df5296 authored by Kazuki Oikawa's avatar Kazuki Oikawa Committed by Takashi Iwai

ALSA: usb-audio: Fix quirks code is not called

snd_usb_{set_interface,ctl_msg}_quirk checks chip->usb_id to need
calling a quirks code. But existed code path that not calling
dev_set_drvdata in usb_audio_probe.

Fixes: 79289e24 ("ALSA: usb-audio: Refer to chip->usb_id for quirks and MIDI creation")
Signed-off-by: default avatarKazuki Oikawa <k@oikw.org>
Cc: <stable@vger.kernel.org> # v4.6+
Reviewed-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
Tested-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent d716fb03
...@@ -556,7 +556,6 @@ static int usb_audio_probe(struct usb_interface *intf, ...@@ -556,7 +556,6 @@ static int usb_audio_probe(struct usb_interface *intf,
goto __error; goto __error;
} }
chip = usb_chip[i]; chip = usb_chip[i];
dev_set_drvdata(&dev->dev, chip);
atomic_inc(&chip->active); /* avoid autopm */ atomic_inc(&chip->active); /* avoid autopm */
break; break;
} }
...@@ -582,6 +581,7 @@ static int usb_audio_probe(struct usb_interface *intf, ...@@ -582,6 +581,7 @@ static int usb_audio_probe(struct usb_interface *intf,
goto __error; goto __error;
} }
} }
dev_set_drvdata(&dev->dev, chip);
/* /*
* For devices with more than one control interface, we assume the * For devices with more than one control interface, we assume the
......
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