diff mbox

[3/5] ALSA: hda - get subvendor from codec rather than pci_dev

Message ID 1401092564-14293-3-git-send-email-hui.wang@canonical.com (mailing list archive)
State Accepted
Commit 621b5a047e5c9ced76afd5e8092283032cda802b
Delegated to: Takashi Iwai
Headers show

Commit Message

Hui Wang May 26, 2014, 8:22 a.m. UTC
It is safer for non-pci situation.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
---
 sound/pci/hda/hda_auto_parser.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/sound/pci/hda/hda_auto_parser.c b/sound/pci/hda/hda_auto_parser.c
index a142753..b684c6e 100644
--- a/sound/pci/hda/hda_auto_parser.c
+++ b/sound/pci/hda/hda_auto_parser.c
@@ -860,7 +860,7 @@  void snd_hda_pick_pin_fixup(struct hda_codec *codec,
 		return;
 
 	for (pq = pin_quirk; pq->subvendor; pq++) {
-		if (codec->bus->pci->subsystem_vendor != pq->subvendor)
+		if ((codec->subsystem_id & 0xffff0000) != (pq->subvendor << 16))
 			continue;
 		if (codec->vendor_id != pq->codec)
 			continue;