summaryrefslogtreecommitdiff
path: root/include/sound
diff options
context:
space:
mode:
authorDimitris Papastamos <dp@opensource.wolfsonmicro.com>2010-12-02 19:11:05 +0300
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-12-03 19:37:06 +0300
commit3335ddca9367675f4ee0bd50cc70402c4919a10d (patch)
tree4391baddac89dc25cd242e44168a0bbf3e1442bc /include/sound
parentff819b8357df0ca9903ff7c9ad518b949c410123 (diff)
downloadlinux-3335ddca9367675f4ee0bd50cc70402c4919a10d.tar.xz
ASoC: soc-cache: Use reg_def_copy instead of reg_cache_default
Make sure to use codec->reg_def_copy instead of codec_drv->reg_cache_default wherever necessary. This change is necessary because in the next patch we move the cache initialization code outside snd_soc_register_codec() and by that time any data marked as __devinitconst such as the original reg_cache_default array might have already been freed by the kernel. 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 'include/sound')
-rw-r--r--include/sound/soc.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index cf76021f04a7..017986159d5e 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -480,6 +480,7 @@ struct snd_soc_codec {
unsigned int (*read)(struct snd_soc_codec *, unsigned int);
int (*write)(struct snd_soc_codec *, unsigned int, unsigned int);
void *reg_cache;
+ const void *reg_def_copy;
const struct snd_soc_cache_ops *cache_ops;
struct mutex cache_rw_mutex;