sound: snd_ctl_remove_unlocked_id: simplify user control counting
[safe/jmp/linux-2.6] / sound / core / misc.c
index 102d1c3..a9710e0 100644 (file)
@@ -39,7 +39,7 @@ void snd_verbose_printk(const char *file, int line, const char *format, ...)
 {
        va_list args;
        
-       if (format[0] == '<' && format[1] >= '0' && format[1] <= '9' && format[2] == '>') {
+       if (format[0] == '<' && format[1] >= '0' && format[1] <= '7' && format[2] == '>') {
                char tmp[] = "<0>";
                tmp[1] = format[1];
                printk("%sALSA %s:%d: ", tmp, file, line);
@@ -60,7 +60,7 @@ void snd_verbose_printd(const char *file, int line, const char *format, ...)
 {
        va_list args;
        
-       if (format[0] == '<' && format[1] >= '0' && format[1] <= '9' && format[2] == '>') {
+       if (format[0] == '<' && format[1] >= '0' && format[1] <= '7' && format[2] == '>') {
                char tmp[] = "<0>";
                tmp[1] = format[1];
                printk("%sALSA %s:%d: ", tmp, file, line);
@@ -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