diff options
author | Dimitris Papastamos <dp@opensource.wolfsonmicro.com> | 2011-01-11 06:43:51 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-01-11 13:30:06 -0500 |
commit | 861f2faf4fbd4fb46a436d41dcb5ff75b243ab3a (patch) | |
tree | 3c474194b4cd913bfff018a75b2b329bd3d79306 | |
parent | 1321e8838bf9bbc883450675d5c501cb8510f1a4 (diff) |
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>
-rw-r--r-- | sound/soc/soc-core.c | 14 |
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) | |||
1748 | list_for_each_entry(codec, &codec_list, list) { | 1748 | list_for_each_entry(codec, &codec_list, list) { |
1749 | if (codec->cache_init) | 1749 | if (codec->cache_init) |
1750 | continue; | 1750 | continue; |
1751 | /* by default we don't override the compress_type */ | ||
1752 | compress_type = 0; | ||
1751 | /* check to see if we need to override the compress_type */ | 1753 | /* check to see if we need to override the compress_type */ |
1752 | for (i = 0; i < card->num_configs; ++i) { | 1754 | for (i = 0; i < card->num_configs; ++i) { |
1753 | codec_conf = &card->codec_conf[i]; | 1755 | codec_conf = &card->codec_conf[i]; |
@@ -1758,18 +1760,6 @@ static void snd_soc_instantiate_card(struct snd_soc_card *card) | |||
1758 | break; | 1760 | break; |
1759 | } | 1761 | } |
1760 | } | 1762 | } |
1761 | if (i == card->num_configs) { | ||
1762 | /* no need to override the compress_type so | ||
1763 | * go ahead and do the standard thing */ | ||
1764 | ret = snd_soc_init_codec_cache(codec, 0); | ||
1765 | if (ret < 0) { | ||
1766 | mutex_unlock(&card->mutex); | ||
1767 | return; | ||
1768 | } | ||
1769 | continue; | ||
1770 | } | ||
1771 | /* override the compress_type with the one supplied in | ||
1772 | * the machine driver */ | ||
1773 | ret = snd_soc_init_codec_cache(codec, compress_type); | 1763 | ret = snd_soc_init_codec_cache(codec, compress_type); |
1774 | if (ret < 0) { | 1764 | if (ret < 0) { |
1775 | mutex_unlock(&card->mutex); | 1765 | mutex_unlock(&card->mutex); |