From: Mark Brown Subject: [PATCH 03/10] ASoC: Tweak tlv320aicx reg_cache_size Date: Wed, 11 Jun 2008 13:47:08 +0100 Message-ID: <1213188435-1986-3-git-send-email-broonie@opensource.wolfsonmicro.com> References: <1213188435-1986-1-git-send-email-broonie@opensource.wolfsonmicro.com> <1213188435-1986-2-git-send-email-broonie@opensource.wolfsonmicro.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from opensource2.wolfsonmicro.com (opensource.wolfsonmicro.com [80.75.67.52]) by alsa0.perex.cz (Postfix) with ESMTP id 2DE092482B for ; Wed, 11 Jun 2008 14:47:18 +0200 (CEST) In-Reply-To: <1213188435-1986-2-git-send-email-broonie@opensource.wolfsonmicro.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Takashi Iwai Cc: alsa-devel@alsa-project.org, Mark Brown , Jarkko Nikula List-Id: alsa-devel@alsa-project.org 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 Cc: Jarkko Nikula --- sound/soc/codecs/tlv320aic3x.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c index dc8a38d..528c26a 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; -- 1.5.5.3