diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-01-30 17:27:45 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-02-09 17:19:11 +0100 |
commit | 8bd4bb7a35e8ebb015a531218614c48e10a3c4ee (patch) | |
tree | f784818fdca481fd681f90c69ab006dda3a0871e /sound/core/misc.c | |
parent | 18e352e4a73465349711a9324767e1b2453383e2 (diff) | |
download | linux-8bd4bb7a35e8ebb015a531218614c48e10a3c4ee.tar.bz2 |
ALSA: Add subdevice_mask field to quirk entries
Introduced a new field, subdevice_mask, which specifies the bitmask
to match with the given subdevice ID.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/misc.c')
-rw-r--r-- | sound/core/misc.c | 10 |
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 |