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-Url: https://git.stricted.de/?a=commitdiff_plain;h=005d65fbac28e6cf32c76e95163012eb326f37e4;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.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 143d2be9eda9..62f1e2b776c4 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;