From: Mark Brown Date: Wed, 11 Jun 2008 12:47:07 +0000 (+0100) Subject: ALSA: ASoC: Fix register cache size for UDA1380 X-Git-Tag: v2.6.27-rc1~1111^2~92 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=8ddd440768e04e0c158c2bfa6178928e1f1eef3e;p=linux-2.6-omap-h63xx.git ALSA: ASoC: Fix register cache size for UDA1380 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 Cc: Philipp Zabel Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela --- diff --git a/sound/soc/codecs/uda1380.c b/sound/soc/codecs/uda1380.c index cb50486201f..6d5335b14d5 100644 --- a/sound/soc/codecs/uda1380.c +++ b/sound/soc/codecs/uda1380.c @@ -655,8 +655,8 @@ static int uda1380_init(struct snd_soc_device *socdev, int dac_clk) GFP_KERNEL); if (codec->reg_cache == NULL) return -ENOMEM; - codec->reg_cache_size = sizeof(uda1380_reg); - codec->reg_cache_step = 2; + codec->reg_cache_size = ARRAY_SIZE(uda1380_reg); + codec->reg_cache_step = 1; uda1380_reset(codec); /* register pcms */