From ae2ff19180d7dcac438e399f874d4de230b7f326 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Wed, 11 Jun 2008 13:47:08 +0100 Subject: [PATCH] ALSA: ASoC: Tweak tlv320aicx reg_cache_size MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Acked-by: Jarkko Nikula  Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela --- sound/soc/codecs/tlv320aic3x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;