From d751b233bb8568f1de1ccbe3824ca69090326251 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Wed, 11 Jun 2008 13:47:06 +0100 Subject: 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 Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela --- sound/soc/codecs/wm8731.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound/soc/codecs/wm8731.c') 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) codec->set_bias_level = wm8731_set_bias_level; codec->dai = &wm8731_dai; codec->num_dai = 1; - codec->reg_cache_size = sizeof(wm8731_reg); + codec->reg_cache_size = ARRAY_SIZE(wm8731_reg); codec->reg_cache = kmemdup(wm8731_reg, sizeof(wm8731_reg), GFP_KERNEL); if (codec->reg_cache == NULL) return -ENOMEM; -- cgit v1.2.3