Commit ae2ff191 authored by Mark Brown's avatar Mark Brown Committed by Jaroslav Kysela

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: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarJaroslav Kysela <perex@perex.cz>
parent 8ddd4407
...@@ -1021,7 +1021,7 @@ static int aic3x_init(struct snd_soc_device *socdev) ...@@ -1021,7 +1021,7 @@ static int aic3x_init(struct snd_soc_device *socdev)
codec->set_bias_level = aic3x_set_bias_level; codec->set_bias_level = aic3x_set_bias_level;
codec->dai = &aic3x_dai; codec->dai = &aic3x_dai;
codec->num_dai = 1; 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); codec->reg_cache = kmemdup(aic3x_reg, sizeof(aic3x_reg), GFP_KERNEL);
if (codec->reg_cache == NULL) if (codec->reg_cache == NULL)
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment