[alsa-devel] [PATCH] ASoC: soc-core: Simplify compress_type overriding functionality
Signed-off-by: Dimitris Papastamos dp@opensource.wolfsonmicro.com --- sound/soc/soc-core.c | 9 +-------- 1 files changed, 1 insertions(+), 8 deletions(-)
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 2ff708a..13c4092 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -1761,15 +1761,8 @@ static void snd_soc_instantiate_card(struct snd_soc_card *card) 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; + compress_type = 0; } - /* 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);
On Tue, Jan 11, 2011 at 11:36:13AM +0000, Dimitris Papastamos wrote:
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;
}compress_type = 0;
Even simpler would be to init compress_type to zero and remove the check.
participants (2)
-
Dimitris Papastamos
-
Mark Brown