From 8bd4bb7a35e8ebb015a531218614c48e10a3c4ee Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 30 Jan 2009 17:27:45 +0100 Subject: 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 --- sound/core/misc.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'sound') diff --git a/sound/core/misc.c b/sound/core/misc.c index 38524f615d9..a9710e0c97a 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 -- cgit v1.2.3