summaryrefslogtreecommitdiffstats
path: root/sound/core
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-03-24 00:35:44 +0100
committerTakashi Iwai <tiwai@suse.de>2009-03-24 00:35:44 +0100
commitbafdb7278cb6a215a8a451024fa1604d790cb7b4 (patch)
tree457657576236f8ec43549e64e4b8a81783f71e19 /sound/core
parentMerge branch 'topic/jack' into for-linus (diff)
parentALSA: Add subdevice_mask field to quirk entries (diff)
downloadlinux-bafdb7278cb6a215a8a451024fa1604d790cb7b4.tar.xz
linux-bafdb7278cb6a215a8a451024fa1604d790cb7b4.zip
Merge branch 'topic/quirk-cleanup' into for-linus
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/misc.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sound/core/misc.c b/sound/core/misc.c
index 38524f615d94..a9710e0c97af 100644
--- a/sound/core/misc.c
+++ b/sound/core/misc.c
@@ -95,12 +95,14 @@ snd_pci_quirk_lookup(struct pci_dev *pci, const struct snd_pci_quirk *list)
{
const struct snd_pci_quirk *q;
- for (q = list; q->subvendor; q++)
- if (q->subvendor == pci->subsystem_vendor &&
- (!q->subdevice || q->subdevice == pci->subsystem_device))
+ for (q = list; q->subvendor; q++) {
+ if (q->subvendor != pci->subsystem_vendor)
+ continue;
+ if (!q->subdevice ||
+ (pci->subsystem_device & q->subdevice_mask) == q->subdevice)
return q;
+ }
return NULL;
}
-
EXPORT_SYMBOL(snd_pci_quirk_lookup);
#endif