aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8753.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2008-06-11 13:47:06 +0100
committerJaroslav Kysela <perex@perex.cz>2008-06-13 16:47:42 +0200
commitd751b233bb8568f1de1ccbe3824ca69090326251 (patch)
tree778dfb8c866ce10a27df33bbb639f93021d64c0c /sound/soc/codecs/wm8753.c
parentALSA: opti93x: use cs4231 lib (diff)
downloadlinux-dev-d751b233bb8568f1de1ccbe3824ca69090326251.tar.xz
linux-dev-d751b233bb8568f1de1ccbe3824ca69090326251.zip
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/wm8753.c')
-rw-r--r--sound/soc/codecs/wm8753.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c
index c32e6326be6c..285c5eaefe02 100644
--- a/sound/soc/codecs/wm8753.c
+++ b/sound/soc/codecs/wm8753.c
@@ -1557,7 +1557,7 @@ static int wm8753_init(struct snd_soc_device *socdev)
codec->set_bias_level = wm8753_set_bias_level;
codec->dai = wm8753_dai;
codec->num_dai = 2;
- codec->reg_cache_size = sizeof(wm8753_reg);
+ codec->reg_cache_size = ARRAY_SIZE(wm8753_reg);
codec->reg_cache = kmemdup(wm8753_reg, sizeof(wm8753_reg), GFP_KERNEL);
if (codec->reg_cache == NULL)