aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8731.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2008-06-11 08:47:06 -0400
committerJaroslav Kysela <perex@perex.cz>2008-06-13 10:47:42 -0400
commitd751b233bb8568f1de1ccbe3824ca69090326251 (patch)
tree778dfb8c866ce10a27df33bbb639f93021d64c0c /sound/soc/codecs/wm8731.c
parent9f240a558f94bea839e14c46c8fccf93bdd35ef6 (diff)
ALSA: ASoC: Fix register cache sizes for Wolfson codecs
The register cache size is used by the codec_reg sysfs file which works in terms of the register cache access functions rather than in terms of raw access to the cache so the size specified needs to be in terms of the number of elements. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/soc/codecs/wm8731.c')
-rw-r--r--sound/soc/codecs/wm8731.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c
index 5acf43ab104e..77880537a3cd 100644
--- a/sound/soc/codecs/wm8731.c
+++ b/sound/soc/codecs/wm8731.c
@@ -534,7 +534,7 @@ static int wm8731_init(struct snd_soc_device *socdev)
534 codec->set_bias_level = wm8731_set_bias_level; 534 codec->set_bias_level = wm8731_set_bias_level;
535 codec->dai = &wm8731_dai; 535 codec->dai = &wm8731_dai;
536 codec->num_dai = 1; 536 codec->num_dai = 1;
537 codec->reg_cache_size = sizeof(wm8731_reg); 537 codec->reg_cache_size = ARRAY_SIZE(wm8731_reg);
538 codec->reg_cache = kmemdup(wm8731_reg, sizeof(wm8731_reg), GFP_KERNEL); 538 codec->reg_cache = kmemdup(wm8731_reg, sizeof(wm8731_reg), GFP_KERNEL);
539 if (codec->reg_cache == NULL) 539 if (codec->reg_cache == NULL)
540 return -ENOMEM; 540 return -ENOMEM;