]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ALSA: ASoC: Tweak tlv320aicx reg_cache_size
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 11 Jun 2008 12:47:08 +0000 (13:47 +0100)
committerJaroslav Kysela <perex@perex.cz>
Fri, 13 Jun 2008 14:47:50 +0000 (16:47 +0200)
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>
sound/soc/codecs/tlv320aic3x.c

index dc8a38d9e53ae88124ffaf15f49aa3b8987fe69c..528c26acdbe2cb434a6c174ba9a5a795491fe774 100644 (file)
@@ -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;