summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2008-06-11 13:47:08 +0100
committerTakashi Iwai <tiwai@suse.de>2008-06-11 15:51:43 +0200
commit014eb43116a9f0fc6f1222191e9b848f16fff37a (patch)
tree46c8781c61c625805e6d91ece746b9b65ee51c95 /sound
parentd53b336fdd10ead1c3762043b5cdb7fe151e2971 (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>
Diffstat (limited to 'sound')
-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)
codec->set_bias_level = aic3x_set_bias_level;
codec->dai = &aic3x_dai;
codec->num_dai = 1;
- codec->reg_cache_size = sizeof(aic3x_reg);
+ codec->reg_cache_size = ARRAY_SIZE(aic3x_reg);
codec->reg_cache = kmemdup(aic3x_reg, sizeof(aic3x_reg), GFP_KERNEL);
if (codec->reg_cache == NULL)
return -ENOMEM;