diff options
-rw-r--r-- | sound/soc/codecs/twl4030.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c index c3c15f891270..00665ada23e2 100644 --- a/sound/soc/codecs/twl4030.c +++ b/sound/soc/codecs/twl4030.c | |||
@@ -111,10 +111,9 @@ static unsigned int twl4030_read(struct snd_soc_codec *codec, unsigned int reg) | |||
111 | return value; | 111 | return value; |
112 | } | 112 | } |
113 | 113 | ||
114 | static bool twl4030_can_write_to_chip(struct snd_soc_codec *codec, | 114 | static bool twl4030_can_write_to_chip(struct twl4030_priv *twl4030, |
115 | unsigned int reg) | 115 | unsigned int reg) |
116 | { | 116 | { |
117 | struct twl4030_priv *twl4030 = snd_soc_codec_get_drvdata(codec); | ||
118 | bool write_to_reg = false; | 117 | bool write_to_reg = false; |
119 | 118 | ||
120 | /* Decide if the given register can be written */ | 119 | /* Decide if the given register can be written */ |
@@ -171,7 +170,7 @@ static int twl4030_write(struct snd_soc_codec *codec, unsigned int reg, | |||
171 | break; | 170 | break; |
172 | } | 171 | } |
173 | 172 | ||
174 | if (twl4030_can_write_to_chip(codec, reg)) | 173 | if (twl4030_can_write_to_chip(twl4030, reg)) |
175 | return twl_i2c_write_u8(TWL4030_MODULE_AUDIO_VOICE, value, reg); | 174 | return twl_i2c_write_u8(TWL4030_MODULE_AUDIO_VOICE, value, reg); |
176 | 175 | ||
177 | return 0; | 176 | return 0; |