From 005d65fbac28e6cf32c76e95163012eb326f37e4 Mon Sep 17 00:00:00 2001 From: Dimitris Papastamos Date: Wed, 22 Sep 2010 16:16:06 +0100 Subject: [PATCH] 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 --- sound/soc/soc-cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;