Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git...
[pandora-kernel.git] / sound / pci / hda / hda_hwdep.c
index bf3ced5..6b2efb8 100644 (file)
@@ -26,6 +26,7 @@
 #include <linux/ctype.h>
 #include <linux/string.h>
 #include <linux/firmware.h>
+#include <linux/export.h>
 #include <sound/core.h>
 #include "hda_codec.h"
 #include "hda_local.h"
@@ -643,14 +644,14 @@ static inline int strmatch(const char *a, const char *b)
 static void parse_codec_mode(char *buf, struct hda_bus *bus,
                             struct hda_codec **codecp)
 {
-       unsigned int vendorid, subid, caddr;
+       int vendorid, subid, caddr;
        struct hda_codec *codec;
 
        *codecp = NULL;
        if (sscanf(buf, "%i %i %i", &vendorid, &subid, &caddr) == 3) {
                list_for_each_entry(codec, &bus->codec_list, list) {
-                       if (codec->vendor_id == vendorid &&
-                           codec->subsystem_id == subid &&
+                       if ((vendorid <= 0 || codec->vendor_id == vendorid) &&
+                           (subid <= 0 || codec->subsystem_id == subid) &&
                            codec->addr == caddr) {
                                *codecp = codec;
                                break;
@@ -756,8 +757,6 @@ static int get_line_from_fw(char *buf, int size, struct firmware *fw)
        }
        if (!fw->size)
                return 0;
-       if (size < fw->size)
-               size = fw->size;
 
        for (len = 0; len < fw->size; len++) {
                if (!*p)