summaryrefslogtreecommitdiff
path: root/sound/soc/soc-core.c
diff options
context:
space:
mode:
authorDimitris Papastamos <dp@opensource.wolfsonmicro.com>2011-01-12 10:38:58 +0000
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-01-12 14:55:23 +0000
commitaea170a099793abcd0e6de46b947458073204241 (patch)
tree187a6851f204b1dd0c98ccce0545248a25c90f24 /sound/soc/soc-core.c
parentd779fce5d79525d66269c8f6e430e1515d697f3d (diff)
downloadlinux-3.10-aea170a099793abcd0e6de46b947458073204241.tar.gz
linux-3.10-aea170a099793abcd0e6de46b947458073204241.tar.bz2
linux-3.10-aea170a099793abcd0e6de46b947458073204241.zip
ASoC: soc-cache: Add reg_size as a member to snd_soc_codec
Simplify the use of reg_size, by calculating it once and storing it in the codec structure for later reference. The value of reg_size is reg_cache_size * reg_word_size. 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.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 04475c18003..cbac50b69c3 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -3500,6 +3500,7 @@ int snd_soc_register_codec(struct device *dev,
/* allocate CODEC register cache */
if (codec_drv->reg_cache_size && codec_drv->reg_word_size) {
reg_size = codec_drv->reg_cache_size * codec_drv->reg_word_size;
+ codec->reg_size = reg_size;
/* it is necessary to make a copy of the default register cache
* because in the case of using a compression type that requires
* the default register cache to be marked as __devinitconst the