From 23bbce34f47762ce944ea9b8b3b3e05e220c6a2e Mon Sep 17 00:00:00 2001 From: Dimitris Papastamos Date: Thu, 2 Dec 2010 14:53:01 +0000 Subject: ASoC: Add compress_type as a member to snd_soc_codec We need to keep a copy of the compress_type supplied by the codec driver so that we can override it if necessary with whatever the machine driver has provided us with. The reason for not modifying the codec->driver struct directly is that ideally we'd like to keep it const. Adjust the code in soc-cache and soc-core to make use of the compress_type member in the snd_soc_codec struct. Signed-off-by: Dimitris Papastamos Acked-by: Liam Girdwood Signed-off-by: Mark Brown --- sound/soc/soc-cache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sound/soc/soc-cache.c') diff --git a/sound/soc/soc-cache.c b/sound/soc/soc-cache.c index 78b25e8c03f6..cb58b11d4f47 100644 --- a/sound/soc/soc-cache.c +++ b/sound/soc/soc-cache.c @@ -1550,11 +1550,11 @@ int snd_soc_cache_init(struct snd_soc_codec *codec) int i; for (i = 0; i < ARRAY_SIZE(cache_types); ++i) - if (cache_types[i].id == codec->driver->compress_type) + if (cache_types[i].id == codec->compress_type) break; if (i == ARRAY_SIZE(cache_types)) { dev_err(codec->dev, "Could not match compress type: %d\n", - codec->driver->compress_type); + codec->compress_type); return -EINVAL; } -- cgit v1.2.3