diff mbox

ASoC: sta32x: Fix cache sync

Message ID 1393090037-8824-1-git-send-email-lars@metafoo.de (mailing list archive)
State Accepted
Commit 70ff00f82a6af0ff68f8f7b411738634ce2f20d0
Headers show

Commit Message

Lars-Peter Clausen Feb. 22, 2014, 5:27 p.m. UTC
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").

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 sound/soc/codecs/sta32x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mark Brown Feb. 23, 2014, 1:49 a.m. UTC | #1
On Sat, Feb 22, 2014 at 06:27:17PM +0100, Lars-Peter Clausen wrote:
> 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.

Applied, thanks.
diff mbox

Patch

diff --git a/sound/soc/codecs/sta32x.c b/sound/soc/codecs/sta32x.c
index 42c5b45..ea78c17 100644
--- a/sound/soc/codecs/sta32x.c
+++ b/sound/soc/codecs/sta32x.c
@@ -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;