aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/tlv320aic3x.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2008-06-11 08:47:08 -0400
committerJaroslav Kysela <perex@perex.cz>2008-06-13 10:47:50 -0400
commitae2ff19180d7dcac438e399f874d4de230b7f326 (patch)
tree83b7fe7bf9b65b42bb7a3b3945c7236de6a27437 /sound/soc/codecs/tlv320aic3x.c
parent8ddd440768e04e0c158c2bfa6178928e1f1eef3e (diff)
ALSA: ASoC: Tweak tlv320aicx reg_cache_size
ASoC codec drivers frequently set the register cache size using sizeof() rather than ARRAY_SIZE(). For tlv320aicx either is correct since the registers are 8 bit but update to use ARRAY_SIZE() for clarity. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Jarkko Nikula <jarkko.nikula@nokia.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/soc/codecs/tlv320aic3x.c')
-rw-r--r--sound/soc/codecs/tlv320aic3x.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c
index dc8a38d9e53a..528c26acdbe2 100644
--- a/sound/soc/codecs/tlv320aic3x.c
+++ b/sound/soc/codecs/tlv320aic3x.c
@@ -1021,7 +1021,7 @@ static int aic3x_init(struct snd_soc_device *socdev)
1021 codec->set_bias_level = aic3x_set_bias_level; 1021 codec->set_bias_level = aic3x_set_bias_level;
1022 codec->dai = &aic3x_dai; 1022 codec->dai = &aic3x_dai;
1023 codec->num_dai = 1; 1023 codec->num_dai = 1;
1024 codec->reg_cache_size = sizeof(aic3x_reg); 1024 codec->reg_cache_size = ARRAY_SIZE(aic3x_reg);
1025 codec->reg_cache = kmemdup(aic3x_reg, sizeof(aic3x_reg), GFP_KERNEL); 1025 codec->reg_cache = kmemdup(aic3x_reg, sizeof(aic3x_reg), GFP_KERNEL);
1026 if (codec->reg_cache == NULL) 1026 if (codec->reg_cache == NULL)
1027 return -ENOMEM; 1027 return -ENOMEM;