]> Pileus Git - ~andy/linux/blobdiff - sound/soc/soc-core.c
Merge branch 'next' into upstream-merge
[~andy/linux] / sound / soc / soc-core.c
index 6cee97e23da67c453013de5ddf760186744b9a71..1c8f3f507f54e7d1fc469ff03a2fdbf787640e3a 100644 (file)
@@ -230,6 +230,7 @@ static const struct file_operations codec_reg_fops = {
        .open = codec_reg_open_file,
        .read = codec_reg_read_file,
        .write = codec_reg_write_file,
+       .llseek = default_llseek,
 };
 
 static void soc_init_codec_debugfs(struct snd_soc_codec *codec)
@@ -2929,7 +2930,7 @@ static inline char *fmt_single_name(struct device *dev, int *id)
                        char tmp[NAME_SIZE];
 
                        /* create unique ID number from I2C addr and bus */
-                       *id = ((id1 && 0xffff) << 16) + id2;
+                       *id = ((id1 & 0xffff) << 16) + id2;
 
                        /* sanitize component name for DAI link creation */
                        snprintf(tmp, NAME_SIZE, "%s.%s", dev->driver->name, name);
@@ -3051,8 +3052,11 @@ int snd_soc_register_dais(struct device *dev,
                }
 
                dai->dev = dev;
-               dai->id = i;
                dai->driver = &dai_drv[i];
+               if (dai->driver->id)
+                       dai->id = dai->driver->id;
+               else
+                       dai->id = i;
                if (!dai->driver->ops)
                        dai->driver->ops = &null_dai_ops;
 
@@ -3296,6 +3300,7 @@ found:
 
        if (codec->reg_cache)
                kfree(codec->reg_cache);
+       kfree(codec->name);
        kfree(codec);
 }
 EXPORT_SYMBOL_GPL(snd_soc_unregister_codec);