aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-core.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2013-08-31 14:31:14 -0400
committerMark Brown <broonie@linaro.org>2013-09-16 19:37:03 -0400
commita94ed23436fb28bdcdd66e7fcf68ca5f7967e456 (patch)
tree0584c2db7f2d1a0b8a21da7f50a95453a78708e5 /sound/soc/soc-core.c
parentb012aa619e50d22df0835b64a5dcebc221fb8053 (diff)
ASoC: Remove 'reg_size' field from snd_soc_codec struct
The reg_size field is calculated in snd_soc_register_codec() and then used exactly once in snd_soc_flat_cache_init(). Since it is calculated based on other fields from the codec struct just move the calculation to snd_soc_flat_cache_init() and remove the 'reg_size' field from the codec struct. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r--sound/soc/soc-core.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index bbe833ab657e..af9648426f4f 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -4159,7 +4159,6 @@ int snd_soc_register_codec(struct device *dev,
4159 struct snd_soc_dai_driver *dai_drv, 4159 struct snd_soc_dai_driver *dai_drv,
4160 int num_dai) 4160 int num_dai)
4161{ 4161{
4162 size_t reg_size;
4163 struct snd_soc_codec *codec; 4162 struct snd_soc_codec *codec;
4164 int ret, i; 4163 int ret, i;
4165 4164
@@ -4197,12 +4196,6 @@ int snd_soc_register_codec(struct device *dev,
4197 codec->num_dai = num_dai; 4196 codec->num_dai = num_dai;
4198 mutex_init(&codec->mutex); 4197 mutex_init(&codec->mutex);
4199 4198
4200 /* allocate CODEC register cache */
4201 if (codec_drv->reg_cache_size && codec_drv->reg_word_size) {
4202 reg_size = codec_drv->reg_cache_size * codec_drv->reg_word_size;
4203 codec->reg_size = reg_size;
4204 }
4205
4206 for (i = 0; i < num_dai; i++) { 4199 for (i = 0; i < num_dai; i++) {
4207 fixup_codec_formats(&dai_drv[i].playback); 4200 fixup_codec_formats(&dai_drv[i].playback);
4208 fixup_codec_formats(&dai_drv[i].capture); 4201 fixup_codec_formats(&dai_drv[i].capture);