summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-core.c
diff options
context:
space:
mode:
authorDimitris Papastamos <dp@opensource.wolfsonmicro.com>2011-01-11 11:43:51 +0000
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-01-11 18:30:06 +0000
commit861f2faf4fbd4fb46a436d41dcb5ff75b243ab3a (patch)
tree3c474194b4cd913bfff018a75b2b329bd3d79306 /sound/soc/soc-core.c
parent1321e8838bf9bbc883450675d5c501cb8510f1a4 (diff)
downloadlinux-861f2faf4fbd4fb46a436d41dcb5ff75b243ab3a.tar.bz2
ASoC: soc-core: Simplify compress_type overriding functionality
Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r--sound/soc/soc-core.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 6cc68140fa67..fb170a073763 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1748,6 +1748,8 @@ static void snd_soc_instantiate_card(struct snd_soc_card *card)
list_for_each_entry(codec, &codec_list, list) {
if (codec->cache_init)
continue;
+ /* by default we don't override the compress_type */
+ compress_type = 0;
/* check to see if we need to override the compress_type */
for (i = 0; i < card->num_configs; ++i) {
codec_conf = &card->codec_conf[i];
@@ -1758,18 +1760,6 @@ static void snd_soc_instantiate_card(struct snd_soc_card *card)
break;
}
}
- if (i == card->num_configs) {
- /* no need to override the compress_type so
- * go ahead and do the standard thing */
- ret = snd_soc_init_codec_cache(codec, 0);
- if (ret < 0) {
- mutex_unlock(&card->mutex);
- return;
- }
- continue;
- }
- /* override the compress_type with the one supplied in
- * the machine driver */
ret = snd_soc_init_codec_cache(codec, compress_type);
if (ret < 0) {
mutex_unlock(&card->mutex);