From: Dimitris Papastamos Date: Wed, 22 Sep 2010 15:16:06 +0000 (+0100) Subject: ASoC: Fix incorrect parameter to snd_soc_codec_volatile_register X-Git-Tag: v3.0~832^2~32^2~519 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=005d65fbac28e6cf32c76e95163012eb326f37e4;p=platform%2Fkernel%2Flinux-amlogic.git ASoC: Fix incorrect parameter to snd_soc_codec_volatile_register We need to pass the register index and not the register value. This patch depends on my previous patch "ASoC: Delegate to hw specific read for volatile registers". Signed-off-by: Dimitris Papastamos Acked-by: Liam Girdwood Signed-off-by: Mark Brown --- diff --git a/sound/soc/soc-cache.c b/sound/soc/soc-cache.c index 143d2be..62f1e2b 100644 --- a/sound/soc/soc-cache.c +++ b/sound/soc/soc-cache.c @@ -177,7 +177,7 @@ static int snd_soc_8_8_write(struct snd_soc_codec *codec, unsigned int reg, data[0] = reg; data[1] = value & 0xff; - if (!snd_soc_codec_volatile_register(codec, value) && + if (!snd_soc_codec_volatile_register(codec, reg) && reg < codec->driver->reg_cache_size) cache[reg] = value;