aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-08-31 04:46:42 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-08-31 04:46:42 -0400
commit0f8dd4ce4775806196300dc075ba8d4f1f9b605d (patch)
tree97045026e9780707706149b2ad19e4cc24c78d75 /sound/soc
parent35dcf58634cf696966cdec69f62b14a7f49a8c42 (diff)
parent6c5b756aaa3e4a20c8d4b47b9dc4799b9cfdfcb8 (diff)
Merge branch 'for-3.1' into for-3.2
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/soc-cache.c12
-rw-r--r--sound/soc/soc-core.c4
-rw-r--r--sound/soc/soc-dapm.c2
3 files changed, 9 insertions, 9 deletions
diff --git a/sound/soc/soc-cache.c b/sound/soc/soc-cache.c
index fdfd4881c9d1..143c705ac27b 100644
--- a/sound/soc/soc-cache.c
+++ b/sound/soc/soc-cache.c
@@ -203,14 +203,14 @@ static int snd_soc_rbtree_cache_sync(struct snd_soc_codec *codec)
203 rbnode = rb_entry(node, struct snd_soc_rbtree_node, node); 203 rbnode = rb_entry(node, struct snd_soc_rbtree_node, node);
204 for (i = 0; i < rbnode->blklen; ++i) { 204 for (i = 0; i < rbnode->blklen; ++i) {
205 regtmp = rbnode->base_reg + i; 205 regtmp = rbnode->base_reg + i;
206 WARN_ON(codec->writable_register &&
207 codec->writable_register(codec, regtmp));
208 val = snd_soc_rbtree_get_register(rbnode, i); 206 val = snd_soc_rbtree_get_register(rbnode, i);
209 def = snd_soc_get_cache_val(codec->reg_def_copy, i, 207 def = snd_soc_get_cache_val(codec->reg_def_copy, i,
210 rbnode->word_size); 208 rbnode->word_size);
211 if (val == def) 209 if (val == def)
212 continue; 210 continue;
213 211
212 WARN_ON(!snd_soc_codec_writable_register(codec, regtmp));
213
214 codec->cache_bypass = 1; 214 codec->cache_bypass = 1;
215 ret = snd_soc_write(codec, regtmp, val); 215 ret = snd_soc_write(codec, regtmp, val);
216 codec->cache_bypass = 0; 216 codec->cache_bypass = 0;
@@ -560,8 +560,7 @@ static int snd_soc_lzo_cache_sync(struct snd_soc_codec *codec)
560 560
561 lzo_blocks = codec->reg_cache; 561 lzo_blocks = codec->reg_cache;
562 for_each_set_bit(i, lzo_blocks[0]->sync_bmp, lzo_blocks[0]->sync_bmp_nbits) { 562 for_each_set_bit(i, lzo_blocks[0]->sync_bmp, lzo_blocks[0]->sync_bmp_nbits) {
563 WARN_ON(codec->writable_register && 563 WARN_ON(!snd_soc_codec_writable_register(codec, i));
564 codec->writable_register(codec, i));
565 ret = snd_soc_cache_read(codec, i, &val); 564 ret = snd_soc_cache_read(codec, i, &val);
566 if (ret) 565 if (ret)
567 return ret; 566 return ret;
@@ -820,8 +819,6 @@ static int snd_soc_flat_cache_sync(struct snd_soc_codec *codec)
820 819
821 codec_drv = codec->driver; 820 codec_drv = codec->driver;
822 for (i = 0; i < codec_drv->reg_cache_size; ++i) { 821 for (i = 0; i < codec_drv->reg_cache_size; ++i) {
823 WARN_ON(codec->writable_register &&
824 codec->writable_register(codec, i));
825 ret = snd_soc_cache_read(codec, i, &val); 822 ret = snd_soc_cache_read(codec, i, &val);
826 if (ret) 823 if (ret)
827 return ret; 824 return ret;
@@ -829,6 +826,9 @@ static int snd_soc_flat_cache_sync(struct snd_soc_codec *codec)
829 if (snd_soc_get_cache_val(codec->reg_def_copy, 826 if (snd_soc_get_cache_val(codec->reg_def_copy,
830 i, codec_drv->reg_word_size) == val) 827 i, codec_drv->reg_word_size) == val)
831 continue; 828 continue;
829
830 WARN_ON(!snd_soc_codec_writable_register(codec, i));
831
832 ret = snd_soc_write(codec, i, val); 832 ret = snd_soc_write(codec, i, val);
833 if (ret) 833 if (ret)
834 return ret; 834 return ret;
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index fd173f6be18d..4065d4e84ea3 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1635,7 +1635,7 @@ int snd_soc_codec_readable_register(struct snd_soc_codec *codec,
1635 if (codec->readable_register) 1635 if (codec->readable_register)
1636 return codec->readable_register(codec, reg); 1636 return codec->readable_register(codec, reg);
1637 else 1637 else
1638 return 0; 1638 return 1;
1639} 1639}
1640EXPORT_SYMBOL_GPL(snd_soc_codec_readable_register); 1640EXPORT_SYMBOL_GPL(snd_soc_codec_readable_register);
1641 1641
@@ -1653,7 +1653,7 @@ int snd_soc_codec_writable_register(struct snd_soc_codec *codec,
1653 if (codec->writable_register) 1653 if (codec->writable_register)
1654 return codec->writable_register(codec, reg); 1654 return codec->writable_register(codec, reg);
1655 else 1655 else
1656 return 0; 1656 return 1;
1657} 1657}
1658EXPORT_SYMBOL_GPL(snd_soc_codec_writable_register); 1658EXPORT_SYMBOL_GPL(snd_soc_codec_writable_register);
1659 1659
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 170c4ffa609f..4859ad77eac7 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -2771,7 +2771,7 @@ EXPORT_SYMBOL_GPL(snd_soc_dapm_ignore_suspend);
2771 2771
2772/** 2772/**
2773 * snd_soc_dapm_free - free dapm resources 2773 * snd_soc_dapm_free - free dapm resources
2774 * @card: SoC device 2774 * @dapm: DAPM context
2775 * 2775 *
2776 * Free all dapm widgets and resources. 2776 * Free all dapm widgets and resources.
2777 */ 2777 */