ASoC: sta32x: Fix cache sync
authorLars-Peter Clausen <lars@metafoo.de>
Sat, 22 Feb 2014 17:27:17 +0000 (18:27 +0100)
committerMark Brown <broonie@linaro.org>
Sun, 23 Feb 2014 01:48:55 +0000 (10:48 +0900)
codec->control_data contains a pointer to the regmap struct of the device, not
to the device private data. Use snd_soc_codec_get_drvdata() instead.

The issue was introduced in commit 29fdf4fbbe ("ASoC: sta32x: Convert to
regmap").

Fixes: 29fdf4fbbe (ASoC: sta32x: Convert to regmap)
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
sound/soc/codecs/sta32x.c

index 42c5b458b046419bbc7f93d97d17a2919393f0f4..ea78c172538cd49a3a26c74da070f13458141057 100644 (file)
@@ -331,7 +331,7 @@ static int sta32x_sync_coef_shadow(struct snd_soc_codec *codec)
 
 static int sta32x_cache_sync(struct snd_soc_codec *codec)
 {
-       struct sta32x_priv *sta32x = codec->control_data;
+       struct sta32x_priv *sta32x = snd_soc_codec_get_drvdata(codec);
        unsigned int mute;
        int rc;