Skip to contentSkip to conversation

ASoC: sta32x: Fix cache sync

PATCH Applied Lars-Peter Clausen 2 participants 2 messages Feb 22, 2014 – Feb 23, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: sta32x: Fix cache sync

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").

---
 sound/soc/codecs/sta32x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/sta32x.c +1 -1
index 42c5b45..ea78c17 100644
@@ -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;
 
Signature · 1 line
1.8.0
maintainer Applied
#1 lore raw
Quoted 2 lines · Lars-Peter Clausen

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.