aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/codecs/88pm860x-codec.c8
-rw-r--r--sound/soc/codecs/ab8500-codec.c12
-rw-r--r--sound/soc/codecs/adav80x.c4
-rw-r--r--sound/soc/codecs/ak4641.c4
-rw-r--r--sound/soc/codecs/cs4270.c2
-rw-r--r--sound/soc/codecs/cs4271.c4
-rw-r--r--sound/soc/codecs/cs42l51.c4
-rw-r--r--sound/soc/codecs/da7210.c4
-rw-r--r--sound/soc/codecs/da7213.c4
-rw-r--r--sound/soc/codecs/da732x.c4
-rw-r--r--sound/soc/codecs/da9055.c2
-rw-r--r--sound/soc/codecs/lm4857.c4
-rw-r--r--sound/soc/codecs/max9768.c4
-rw-r--r--sound/soc/codecs/max98088.c12
-rw-r--r--sound/soc/codecs/max98090.c4
-rw-r--r--sound/soc/codecs/max98095.c16
-rw-r--r--sound/soc/codecs/pcm1681.c4
-rw-r--r--sound/soc/codecs/rt5631.c4
-rw-r--r--sound/soc/codecs/sgtl5000.c4
-rw-r--r--sound/soc/codecs/sta32x.c4
-rw-r--r--sound/soc/codecs/tas5086.c4
-rw-r--r--sound/soc/codecs/tlv320aic23.c4
-rw-r--r--sound/soc/codecs/tlv320dac33.c4
-rw-r--r--sound/soc/codecs/twl4030.c10
-rw-r--r--sound/soc/codecs/twl6040.c8
-rw-r--r--sound/soc/codecs/wl1273.c12
-rw-r--r--sound/soc/codecs/wm2000.c8
-rw-r--r--sound/soc/codecs/wm8350.c4
-rw-r--r--sound/soc/codecs/wm8400.c2
-rw-r--r--sound/soc/codecs/wm8580.c2
-rw-r--r--sound/soc/codecs/wm8731.c4
-rw-r--r--sound/soc/codecs/wm8753.c4
-rw-r--r--sound/soc/codecs/wm8804.c4
-rw-r--r--sound/soc/codecs/wm8903.c4
-rw-r--r--sound/soc/codecs/wm8904.c14
-rw-r--r--sound/soc/codecs/wm8955.c4
-rw-r--r--sound/soc/codecs/wm8958-dsp2.c32
-rw-r--r--sound/soc/codecs/wm8960.c4
-rw-r--r--sound/soc/codecs/wm8962.c8
-rw-r--r--sound/soc/codecs/wm8983.c4
-rw-r--r--sound/soc/codecs/wm8985.c4
-rw-r--r--sound/soc/codecs/wm8990.c2
-rw-r--r--sound/soc/codecs/wm8991.c2
-rw-r--r--sound/soc/codecs/wm8994.c10
-rw-r--r--sound/soc/codecs/wm8996.c4
-rw-r--r--sound/soc/codecs/wm9081.c4
-rw-r--r--sound/soc/codecs/wm_adsp.c4
-rw-r--r--sound/soc/codecs/wm_hubs.c2
48 files changed, 140 insertions, 140 deletions
diff --git a/sound/soc/codecs/88pm860x-codec.c b/sound/soc/codecs/88pm860x-codec.c
index b07e17160f94..b18cafa5a858 100644
--- a/sound/soc/codecs/88pm860x-codec.c
+++ b/sound/soc/codecs/88pm860x-codec.c
@@ -276,7 +276,7 @@ static int snd_soc_get_volsw_2r_st(struct snd_kcontrol *kcontrol,
276{ 276{
277 struct soc_mixer_control *mc = 277 struct soc_mixer_control *mc =
278 (struct soc_mixer_control *)kcontrol->private_value; 278 (struct soc_mixer_control *)kcontrol->private_value;
279 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 279 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
280 unsigned int reg = mc->reg; 280 unsigned int reg = mc->reg;
281 unsigned int reg2 = mc->rreg; 281 unsigned int reg2 = mc->rreg;
282 int val[2], val2[2], i; 282 int val[2], val2[2], i;
@@ -300,7 +300,7 @@ static int snd_soc_put_volsw_2r_st(struct snd_kcontrol *kcontrol,
300{ 300{
301 struct soc_mixer_control *mc = 301 struct soc_mixer_control *mc =
302 (struct soc_mixer_control *)kcontrol->private_value; 302 (struct soc_mixer_control *)kcontrol->private_value;
303 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 303 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
304 unsigned int reg = mc->reg; 304 unsigned int reg = mc->reg;
305 unsigned int reg2 = mc->rreg; 305 unsigned int reg2 = mc->rreg;
306 int err; 306 int err;
@@ -333,7 +333,7 @@ static int snd_soc_get_volsw_2r_out(struct snd_kcontrol *kcontrol,
333{ 333{
334 struct soc_mixer_control *mc = 334 struct soc_mixer_control *mc =
335 (struct soc_mixer_control *)kcontrol->private_value; 335 (struct soc_mixer_control *)kcontrol->private_value;
336 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 336 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
337 unsigned int reg = mc->reg; 337 unsigned int reg = mc->reg;
338 unsigned int reg2 = mc->rreg; 338 unsigned int reg2 = mc->rreg;
339 unsigned int shift = mc->shift; 339 unsigned int shift = mc->shift;
@@ -353,7 +353,7 @@ static int snd_soc_put_volsw_2r_out(struct snd_kcontrol *kcontrol,
353{ 353{
354 struct soc_mixer_control *mc = 354 struct soc_mixer_control *mc =
355 (struct soc_mixer_control *)kcontrol->private_value; 355 (struct soc_mixer_control *)kcontrol->private_value;
356 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 356 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
357 unsigned int reg = mc->reg; 357 unsigned int reg = mc->reg;
358 unsigned int reg2 = mc->rreg; 358 unsigned int reg2 = mc->rreg;
359 unsigned int shift = mc->shift; 359 unsigned int shift = mc->shift;
diff --git a/sound/soc/codecs/ab8500-codec.c b/sound/soc/codecs/ab8500-codec.c
index 1ad92cbf0b24..1fb4402bf72d 100644
--- a/sound/soc/codecs/ab8500-codec.c
+++ b/sound/soc/codecs/ab8500-codec.c
@@ -1139,7 +1139,7 @@ static void anc_configure(struct snd_soc_codec *codec,
1139static int sid_status_control_get(struct snd_kcontrol *kcontrol, 1139static int sid_status_control_get(struct snd_kcontrol *kcontrol,
1140 struct snd_ctl_elem_value *ucontrol) 1140 struct snd_ctl_elem_value *ucontrol)
1141{ 1141{
1142 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 1142 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
1143 struct ab8500_codec_drvdata *drvdata = dev_get_drvdata(codec->dev); 1143 struct ab8500_codec_drvdata *drvdata = dev_get_drvdata(codec->dev);
1144 1144
1145 mutex_lock(&codec->mutex); 1145 mutex_lock(&codec->mutex);
@@ -1153,7 +1153,7 @@ static int sid_status_control_get(struct snd_kcontrol *kcontrol,
1153static int sid_status_control_put(struct snd_kcontrol *kcontrol, 1153static int sid_status_control_put(struct snd_kcontrol *kcontrol,
1154 struct snd_ctl_elem_value *ucontrol) 1154 struct snd_ctl_elem_value *ucontrol)
1155{ 1155{
1156 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 1156 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
1157 struct ab8500_codec_drvdata *drvdata = dev_get_drvdata(codec->dev); 1157 struct ab8500_codec_drvdata *drvdata = dev_get_drvdata(codec->dev);
1158 unsigned int param, sidconf, val; 1158 unsigned int param, sidconf, val;
1159 int status = 1; 1159 int status = 1;
@@ -1208,7 +1208,7 @@ out:
1208static int anc_status_control_get(struct snd_kcontrol *kcontrol, 1208static int anc_status_control_get(struct snd_kcontrol *kcontrol,
1209 struct snd_ctl_elem_value *ucontrol) 1209 struct snd_ctl_elem_value *ucontrol)
1210{ 1210{
1211 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 1211 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
1212 struct ab8500_codec_drvdata *drvdata = dev_get_drvdata(codec->dev); 1212 struct ab8500_codec_drvdata *drvdata = dev_get_drvdata(codec->dev);
1213 1213
1214 mutex_lock(&codec->mutex); 1214 mutex_lock(&codec->mutex);
@@ -1221,7 +1221,7 @@ static int anc_status_control_get(struct snd_kcontrol *kcontrol,
1221static int anc_status_control_put(struct snd_kcontrol *kcontrol, 1221static int anc_status_control_put(struct snd_kcontrol *kcontrol,
1222 struct snd_ctl_elem_value *ucontrol) 1222 struct snd_ctl_elem_value *ucontrol)
1223{ 1223{
1224 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 1224 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
1225 struct ab8500_codec_drvdata *drvdata = dev_get_drvdata(codec->dev); 1225 struct ab8500_codec_drvdata *drvdata = dev_get_drvdata(codec->dev);
1226 struct device *dev = codec->dev; 1226 struct device *dev = codec->dev;
1227 bool apply_fir, apply_iir; 1227 bool apply_fir, apply_iir;
@@ -1306,7 +1306,7 @@ static int filter_control_info(struct snd_kcontrol *kcontrol,
1306static int filter_control_get(struct snd_kcontrol *kcontrol, 1306static int filter_control_get(struct snd_kcontrol *kcontrol,
1307 struct snd_ctl_elem_value *ucontrol) 1307 struct snd_ctl_elem_value *ucontrol)
1308{ 1308{
1309 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 1309 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
1310 struct filter_control *fc = 1310 struct filter_control *fc =
1311 (struct filter_control *)kcontrol->private_value; 1311 (struct filter_control *)kcontrol->private_value;
1312 unsigned int i; 1312 unsigned int i;
@@ -1322,7 +1322,7 @@ static int filter_control_get(struct snd_kcontrol *kcontrol,
1322static int filter_control_put(struct snd_kcontrol *kcontrol, 1322static int filter_control_put(struct snd_kcontrol *kcontrol,
1323 struct snd_ctl_elem_value *ucontrol) 1323 struct snd_ctl_elem_value *ucontrol)
1324{ 1324{
1325 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 1325 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
1326 struct filter_control *fc = 1326 struct filter_control *fc =
1327 (struct filter_control *)kcontrol->private_value; 1327 (struct filter_control *)kcontrol->private_value;
1328 unsigned int i; 1328 unsigned int i;
diff --git a/sound/soc/codecs/adav80x.c b/sound/soc/codecs/adav80x.c
index 5062e34ee8dc..cf170b5ef426 100644
--- a/sound/soc/codecs/adav80x.c
+++ b/sound/soc/codecs/adav80x.c
@@ -315,7 +315,7 @@ static int adav80x_set_deemph(struct snd_soc_codec *codec)
315static int adav80x_put_deemph(struct snd_kcontrol *kcontrol, 315static int adav80x_put_deemph(struct snd_kcontrol *kcontrol,
316 struct snd_ctl_elem_value *ucontrol) 316 struct snd_ctl_elem_value *ucontrol)
317{ 317{
318 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 318 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
319 struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec); 319 struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec);
320 unsigned int deemph = ucontrol->value.enumerated.item[0]; 320 unsigned int deemph = ucontrol->value.enumerated.item[0];
321 321
@@ -330,7 +330,7 @@ static int adav80x_put_deemph(struct snd_kcontrol *kcontrol,
330static int adav80x_get_deemph(struct snd_kcontrol *kcontrol, 330static int adav80x_get_deemph(struct snd_kcontrol *kcontrol,
331 struct snd_ctl_elem_value *ucontrol) 331 struct snd_ctl_elem_value *ucontrol)
332{ 332{
333 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 333 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
334 struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec); 334 struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec);
335 335
336 ucontrol->value.enumerated.item[0] = adav80x->deemph; 336 ucontrol->value.enumerated.item[0] = adav80x->deemph;
diff --git a/sound/soc/codecs/ak4641.c b/sound/soc/codecs/ak4641.c
index 868c0e2da1ec..7afe8f482088 100644
--- a/sound/soc/codecs/ak4641.c
+++ b/sound/soc/codecs/ak4641.c
@@ -74,7 +74,7 @@ static int ak4641_set_deemph(struct snd_soc_codec *codec)
74static int ak4641_put_deemph(struct snd_kcontrol *kcontrol, 74static int ak4641_put_deemph(struct snd_kcontrol *kcontrol,
75 struct snd_ctl_elem_value *ucontrol) 75 struct snd_ctl_elem_value *ucontrol)
76{ 76{
77 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 77 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
78 struct ak4641_priv *ak4641 = snd_soc_codec_get_drvdata(codec); 78 struct ak4641_priv *ak4641 = snd_soc_codec_get_drvdata(codec);
79 int deemph = ucontrol->value.enumerated.item[0]; 79 int deemph = ucontrol->value.enumerated.item[0];
80 80
@@ -89,7 +89,7 @@ static int ak4641_put_deemph(struct snd_kcontrol *kcontrol,
89static int ak4641_get_deemph(struct snd_kcontrol *kcontrol, 89static int ak4641_get_deemph(struct snd_kcontrol *kcontrol,
90 struct snd_ctl_elem_value *ucontrol) 90 struct snd_ctl_elem_value *ucontrol)
91{ 91{
92 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 92 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
93 struct ak4641_priv *ak4641 = snd_soc_codec_get_drvdata(codec); 93 struct ak4641_priv *ak4641 = snd_soc_codec_get_drvdata(codec);
94 94
95 ucontrol->value.enumerated.item[0] = ak4641->deemph; 95 ucontrol->value.enumerated.item[0] = ak4641->deemph;
diff --git a/sound/soc/codecs/cs4270.c b/sound/soc/codecs/cs4270.c
index 3920e6264948..9947a9583679 100644
--- a/sound/soc/codecs/cs4270.c
+++ b/sound/soc/codecs/cs4270.c
@@ -438,7 +438,7 @@ static int cs4270_dai_mute(struct snd_soc_dai *dai, int mute)
438static int cs4270_soc_put_mute(struct snd_kcontrol *kcontrol, 438static int cs4270_soc_put_mute(struct snd_kcontrol *kcontrol,
439 struct snd_ctl_elem_value *ucontrol) 439 struct snd_ctl_elem_value *ucontrol)
440{ 440{
441 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 441 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
442 struct cs4270_private *cs4270 = snd_soc_codec_get_drvdata(codec); 442 struct cs4270_private *cs4270 = snd_soc_codec_get_drvdata(codec);
443 int left = !ucontrol->value.integer.value[0]; 443 int left = !ucontrol->value.integer.value[0];
444 int right = !ucontrol->value.integer.value[1]; 444 int right = !ucontrol->value.integer.value[1];
diff --git a/sound/soc/codecs/cs4271.c b/sound/soc/codecs/cs4271.c
index aef4965750c7..93cec52f4733 100644
--- a/sound/soc/codecs/cs4271.c
+++ b/sound/soc/codecs/cs4271.c
@@ -284,7 +284,7 @@ static int cs4271_set_deemph(struct snd_soc_codec *codec)
284static int cs4271_get_deemph(struct snd_kcontrol *kcontrol, 284static int cs4271_get_deemph(struct snd_kcontrol *kcontrol,
285 struct snd_ctl_elem_value *ucontrol) 285 struct snd_ctl_elem_value *ucontrol)
286{ 286{
287 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 287 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
288 struct cs4271_private *cs4271 = snd_soc_codec_get_drvdata(codec); 288 struct cs4271_private *cs4271 = snd_soc_codec_get_drvdata(codec);
289 289
290 ucontrol->value.enumerated.item[0] = cs4271->deemph; 290 ucontrol->value.enumerated.item[0] = cs4271->deemph;
@@ -294,7 +294,7 @@ static int cs4271_get_deemph(struct snd_kcontrol *kcontrol,
294static int cs4271_put_deemph(struct snd_kcontrol *kcontrol, 294static int cs4271_put_deemph(struct snd_kcontrol *kcontrol,
295 struct snd_ctl_elem_value *ucontrol) 295 struct snd_ctl_elem_value *ucontrol)
296{ 296{
297 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 297 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
298 struct cs4271_private *cs4271 = snd_soc_codec_get_drvdata(codec); 298 struct cs4271_private *cs4271 = snd_soc_codec_get_drvdata(codec);
299 299
300 cs4271->deemph = ucontrol->value.enumerated.item[0]; 300 cs4271->deemph = ucontrol->value.enumerated.item[0];
diff --git a/sound/soc/codecs/cs42l51.c b/sound/soc/codecs/cs42l51.c
index 6c0da2baa154..23acaa0263dc 100644
--- a/sound/soc/codecs/cs42l51.c
+++ b/sound/soc/codecs/cs42l51.c
@@ -55,7 +55,7 @@ struct cs42l51_private {
55static int cs42l51_get_chan_mix(struct snd_kcontrol *kcontrol, 55static int cs42l51_get_chan_mix(struct snd_kcontrol *kcontrol,
56 struct snd_ctl_elem_value *ucontrol) 56 struct snd_ctl_elem_value *ucontrol)
57{ 57{
58 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 58 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
59 unsigned long value = snd_soc_read(codec, CS42L51_PCM_MIXER)&3; 59 unsigned long value = snd_soc_read(codec, CS42L51_PCM_MIXER)&3;
60 60
61 switch (value) { 61 switch (value) {
@@ -83,7 +83,7 @@ static int cs42l51_get_chan_mix(struct snd_kcontrol *kcontrol,
83static int cs42l51_set_chan_mix(struct snd_kcontrol *kcontrol, 83static int cs42l51_set_chan_mix(struct snd_kcontrol *kcontrol,
84 struct snd_ctl_elem_value *ucontrol) 84 struct snd_ctl_elem_value *ucontrol)
85{ 85{
86 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 86 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
87 unsigned char val; 87 unsigned char val;
88 88
89 switch (ucontrol->value.integer.value[0]) { 89 switch (ucontrol->value.integer.value[0]) {
diff --git a/sound/soc/codecs/da7210.c b/sound/soc/codecs/da7210.c
index 137e8ebc092c..21810e5f3321 100644
--- a/sound/soc/codecs/da7210.c
+++ b/sound/soc/codecs/da7210.c
@@ -335,7 +335,7 @@ static SOC_ENUM_SINGLE_DECL(da7210_hp_mode_sel,
335static int da7210_put_alc_sw(struct snd_kcontrol *kcontrol, 335static int da7210_put_alc_sw(struct snd_kcontrol *kcontrol,
336 struct snd_ctl_elem_value *ucontrol) 336 struct snd_ctl_elem_value *ucontrol)
337{ 337{
338 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 338 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
339 339
340 if (ucontrol->value.integer.value[0]) { 340 if (ucontrol->value.integer.value[0]) {
341 /* Check if noise suppression is enabled */ 341 /* Check if noise suppression is enabled */
@@ -358,7 +358,7 @@ static int da7210_put_alc_sw(struct snd_kcontrol *kcontrol,
358static int da7210_put_noise_sup_sw(struct snd_kcontrol *kcontrol, 358static int da7210_put_noise_sup_sw(struct snd_kcontrol *kcontrol,
359 struct snd_ctl_elem_value *ucontrol) 359 struct snd_ctl_elem_value *ucontrol)
360{ 360{
361 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 361 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
362 u8 val; 362 u8 val;
363 363
364 if (ucontrol->value.integer.value[0]) { 364 if (ucontrol->value.integer.value[0]) {
diff --git a/sound/soc/codecs/da7213.c b/sound/soc/codecs/da7213.c
index 738fa18a50d2..9ec577f0edb4 100644
--- a/sound/soc/codecs/da7213.c
+++ b/sound/soc/codecs/da7213.c
@@ -345,7 +345,7 @@ static void da7213_alc_calib(struct snd_soc_codec *codec)
345static int da7213_put_mixin_gain(struct snd_kcontrol *kcontrol, 345static int da7213_put_mixin_gain(struct snd_kcontrol *kcontrol,
346 struct snd_ctl_elem_value *ucontrol) 346 struct snd_ctl_elem_value *ucontrol)
347{ 347{
348 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 348 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
349 struct da7213_priv *da7213 = snd_soc_codec_get_drvdata(codec); 349 struct da7213_priv *da7213 = snd_soc_codec_get_drvdata(codec);
350 int ret; 350 int ret;
351 351
@@ -361,7 +361,7 @@ static int da7213_put_mixin_gain(struct snd_kcontrol *kcontrol,
361static int da7213_put_alc_sw(struct snd_kcontrol *kcontrol, 361static int da7213_put_alc_sw(struct snd_kcontrol *kcontrol,
362 struct snd_ctl_elem_value *ucontrol) 362 struct snd_ctl_elem_value *ucontrol)
363{ 363{
364 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 364 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
365 struct da7213_priv *da7213 = snd_soc_codec_get_drvdata(codec); 365 struct da7213_priv *da7213 = snd_soc_codec_get_drvdata(codec);
366 366
367 /* Force ALC offset calibration if enabling ALC */ 367 /* Force ALC offset calibration if enabling ALC */
diff --git a/sound/soc/codecs/da732x.c b/sound/soc/codecs/da732x.c
index 48f3fef68484..2fae31cb0067 100644
--- a/sound/soc/codecs/da732x.c
+++ b/sound/soc/codecs/da732x.c
@@ -332,7 +332,7 @@ static SOC_ENUM_SINGLE_DECL(da732x_adc2_voice_filter_enum,
332static int da732x_hpf_set(struct snd_kcontrol *kcontrol, 332static int da732x_hpf_set(struct snd_kcontrol *kcontrol,
333 struct snd_ctl_elem_value *ucontrol) 333 struct snd_ctl_elem_value *ucontrol)
334{ 334{
335 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 335 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
336 struct soc_enum *enum_ctrl = (struct soc_enum *)kcontrol->private_value; 336 struct soc_enum *enum_ctrl = (struct soc_enum *)kcontrol->private_value;
337 unsigned int reg = enum_ctrl->reg; 337 unsigned int reg = enum_ctrl->reg;
338 unsigned int sel = ucontrol->value.integer.value[0]; 338 unsigned int sel = ucontrol->value.integer.value[0];
@@ -360,7 +360,7 @@ static int da732x_hpf_set(struct snd_kcontrol *kcontrol,
360static int da732x_hpf_get(struct snd_kcontrol *kcontrol, 360static int da732x_hpf_get(struct snd_kcontrol *kcontrol,
361 struct snd_ctl_elem_value *ucontrol) 361 struct snd_ctl_elem_value *ucontrol)
362{ 362{
363 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 363 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
364 struct soc_enum *enum_ctrl = (struct soc_enum *)kcontrol->private_value; 364 struct soc_enum *enum_ctrl = (struct soc_enum *)kcontrol->private_value;
365 unsigned int reg = enum_ctrl->reg; 365 unsigned int reg = enum_ctrl->reg;
366 int val; 366 int val;
diff --git a/sound/soc/codecs/da9055.c b/sound/soc/codecs/da9055.c
index 4ff06b50fbba..ad19cc56702b 100644
--- a/sound/soc/codecs/da9055.c
+++ b/sound/soc/codecs/da9055.c
@@ -484,7 +484,7 @@ static int da9055_get_alc_data(struct snd_soc_codec *codec, u8 reg_val)
484static int da9055_put_alc_sw(struct snd_kcontrol *kcontrol, 484static int da9055_put_alc_sw(struct snd_kcontrol *kcontrol,
485 struct snd_ctl_elem_value *ucontrol) 485 struct snd_ctl_elem_value *ucontrol)
486{ 486{
487 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 487 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
488 u8 reg_val, adc_left, adc_right, mic_left, mic_right; 488 u8 reg_val, adc_left, adc_right, mic_left, mic_right;
489 int avg_left_data, avg_right_data, offset_l, offset_r; 489 int avg_left_data, avg_right_data, offset_l, offset_r;
490 490
diff --git a/sound/soc/codecs/lm4857.c b/sound/soc/codecs/lm4857.c
index 4f048db9f55f..a924bb9d7886 100644
--- a/sound/soc/codecs/lm4857.c
+++ b/sound/soc/codecs/lm4857.c
@@ -49,7 +49,7 @@ static const struct reg_default lm4857_default_regs[] = {
49static int lm4857_get_mode(struct snd_kcontrol *kcontrol, 49static int lm4857_get_mode(struct snd_kcontrol *kcontrol,
50 struct snd_ctl_elem_value *ucontrol) 50 struct snd_ctl_elem_value *ucontrol)
51{ 51{
52 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 52 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
53 struct lm4857 *lm4857 = snd_soc_codec_get_drvdata(codec); 53 struct lm4857 *lm4857 = snd_soc_codec_get_drvdata(codec);
54 54
55 ucontrol->value.integer.value[0] = lm4857->mode; 55 ucontrol->value.integer.value[0] = lm4857->mode;
@@ -60,7 +60,7 @@ static int lm4857_get_mode(struct snd_kcontrol *kcontrol,
60static int lm4857_set_mode(struct snd_kcontrol *kcontrol, 60static int lm4857_set_mode(struct snd_kcontrol *kcontrol,
61 struct snd_ctl_elem_value *ucontrol) 61 struct snd_ctl_elem_value *ucontrol)
62{ 62{
63 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 63 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
64 struct lm4857 *lm4857 = snd_soc_codec_get_drvdata(codec); 64 struct lm4857 *lm4857 = snd_soc_codec_get_drvdata(codec);
65 uint8_t value = ucontrol->value.integer.value[0]; 65 uint8_t value = ucontrol->value.integer.value[0];
66 66
diff --git a/sound/soc/codecs/max9768.c b/sound/soc/codecs/max9768.c
index ec481fc428c7..e1c196a41930 100644
--- a/sound/soc/codecs/max9768.c
+++ b/sound/soc/codecs/max9768.c
@@ -43,7 +43,7 @@ static struct reg_default max9768_default_regs[] = {
43static int max9768_get_gpio(struct snd_kcontrol *kcontrol, 43static int max9768_get_gpio(struct snd_kcontrol *kcontrol,
44 struct snd_ctl_elem_value *ucontrol) 44 struct snd_ctl_elem_value *ucontrol)
45{ 45{
46 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 46 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
47 struct max9768 *max9768 = snd_soc_codec_get_drvdata(codec); 47 struct max9768 *max9768 = snd_soc_codec_get_drvdata(codec);
48 int val = gpio_get_value_cansleep(max9768->mute_gpio); 48 int val = gpio_get_value_cansleep(max9768->mute_gpio);
49 49
@@ -55,7 +55,7 @@ static int max9768_get_gpio(struct snd_kcontrol *kcontrol,
55static int max9768_set_gpio(struct snd_kcontrol *kcontrol, 55static int max9768_set_gpio(struct snd_kcontrol *kcontrol,
56 struct snd_ctl_elem_value *ucontrol) 56 struct snd_ctl_elem_value *ucontrol)
57{ 57{
58 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 58 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
59 struct max9768 *max9768 = snd_soc_codec_get_drvdata(codec); 59 struct max9768 *max9768 = snd_soc_codec_get_drvdata(codec);
60 60
61 gpio_set_value_cansleep(max9768->mute_gpio, !ucontrol->value.integer.value[0]); 61 gpio_set_value_cansleep(max9768->mute_gpio, !ucontrol->value.integer.value[0]);
diff --git a/sound/soc/codecs/max98088.c b/sound/soc/codecs/max98088.c
index ef7cf89f5623..9134982807b5 100644
--- a/sound/soc/codecs/max98088.c
+++ b/sound/soc/codecs/max98088.c
@@ -635,7 +635,7 @@ static SOC_ENUM_SINGLE_DECL(max98088_dai1_adc_filter_enum,
635static int max98088_mic1pre_set(struct snd_kcontrol *kcontrol, 635static int max98088_mic1pre_set(struct snd_kcontrol *kcontrol,
636 struct snd_ctl_elem_value *ucontrol) 636 struct snd_ctl_elem_value *ucontrol)
637{ 637{
638 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 638 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
639 struct max98088_priv *max98088 = snd_soc_codec_get_drvdata(codec); 639 struct max98088_priv *max98088 = snd_soc_codec_get_drvdata(codec);
640 unsigned int sel = ucontrol->value.integer.value[0]; 640 unsigned int sel = ucontrol->value.integer.value[0];
641 641
@@ -649,7 +649,7 @@ static int max98088_mic1pre_set(struct snd_kcontrol *kcontrol,
649static int max98088_mic1pre_get(struct snd_kcontrol *kcontrol, 649static int max98088_mic1pre_get(struct snd_kcontrol *kcontrol,
650 struct snd_ctl_elem_value *ucontrol) 650 struct snd_ctl_elem_value *ucontrol)
651{ 651{
652 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 652 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
653 struct max98088_priv *max98088 = snd_soc_codec_get_drvdata(codec); 653 struct max98088_priv *max98088 = snd_soc_codec_get_drvdata(codec);
654 654
655 ucontrol->value.integer.value[0] = max98088->mic1pre; 655 ucontrol->value.integer.value[0] = max98088->mic1pre;
@@ -659,7 +659,7 @@ static int max98088_mic1pre_get(struct snd_kcontrol *kcontrol,
659static int max98088_mic2pre_set(struct snd_kcontrol *kcontrol, 659static int max98088_mic2pre_set(struct snd_kcontrol *kcontrol,
660 struct snd_ctl_elem_value *ucontrol) 660 struct snd_ctl_elem_value *ucontrol)
661{ 661{
662 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 662 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
663 struct max98088_priv *max98088 = snd_soc_codec_get_drvdata(codec); 663 struct max98088_priv *max98088 = snd_soc_codec_get_drvdata(codec);
664 unsigned int sel = ucontrol->value.integer.value[0]; 664 unsigned int sel = ucontrol->value.integer.value[0];
665 665
@@ -673,7 +673,7 @@ static int max98088_mic2pre_set(struct snd_kcontrol *kcontrol,
673static int max98088_mic2pre_get(struct snd_kcontrol *kcontrol, 673static int max98088_mic2pre_get(struct snd_kcontrol *kcontrol,
674 struct snd_ctl_elem_value *ucontrol) 674 struct snd_ctl_elem_value *ucontrol)
675{ 675{
676 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 676 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
677 struct max98088_priv *max98088 = snd_soc_codec_get_drvdata(codec); 677 struct max98088_priv *max98088 = snd_soc_codec_get_drvdata(codec);
678 678
679 ucontrol->value.integer.value[0] = max98088->mic2pre; 679 ucontrol->value.integer.value[0] = max98088->mic2pre;
@@ -1750,7 +1750,7 @@ static void max98088_setup_eq2(struct snd_soc_codec *codec)
1750static int max98088_put_eq_enum(struct snd_kcontrol *kcontrol, 1750static int max98088_put_eq_enum(struct snd_kcontrol *kcontrol,
1751 struct snd_ctl_elem_value *ucontrol) 1751 struct snd_ctl_elem_value *ucontrol)
1752{ 1752{
1753 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 1753 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
1754 struct max98088_priv *max98088 = snd_soc_codec_get_drvdata(codec); 1754 struct max98088_priv *max98088 = snd_soc_codec_get_drvdata(codec);
1755 struct max98088_pdata *pdata = max98088->pdata; 1755 struct max98088_pdata *pdata = max98088->pdata;
1756 int channel = max98088_get_channel(codec, kcontrol->id.name); 1756 int channel = max98088_get_channel(codec, kcontrol->id.name);
@@ -1782,7 +1782,7 @@ static int max98088_put_eq_enum(struct snd_kcontrol *kcontrol,
1782static int max98088_get_eq_enum(struct snd_kcontrol *kcontrol, 1782static int max98088_get_eq_enum(struct snd_kcontrol *kcontrol,
1783 struct snd_ctl_elem_value *ucontrol) 1783 struct snd_ctl_elem_value *ucontrol)
1784{ 1784{
1785 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 1785 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
1786 struct max98088_priv *max98088 = snd_soc_codec_get_drvdata(codec); 1786 struct max98088_priv *max98088 = snd_soc_codec_get_drvdata(codec);
1787 int channel = max98088_get_channel(codec, kcontrol->id.name); 1787 int channel = max98088_get_channel(codec, kcontrol->id.name);
1788 struct max98088_cdata *cdata; 1788 struct max98088_cdata *cdata;
diff --git a/sound/soc/codecs/max98090.c b/sound/soc/codecs/max98090.c
index f7b0b37aa858..49d12387ac2f 100644
--- a/sound/soc/codecs/max98090.c
+++ b/sound/soc/codecs/max98090.c
@@ -426,7 +426,7 @@ static const unsigned int max98090_rcv_lout_tlv[] = {
426static int max98090_get_enab_tlv(struct snd_kcontrol *kcontrol, 426static int max98090_get_enab_tlv(struct snd_kcontrol *kcontrol,
427 struct snd_ctl_elem_value *ucontrol) 427 struct snd_ctl_elem_value *ucontrol)
428{ 428{
429 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 429 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
430 struct max98090_priv *max98090 = snd_soc_codec_get_drvdata(codec); 430 struct max98090_priv *max98090 = snd_soc_codec_get_drvdata(codec);
431 struct soc_mixer_control *mc = 431 struct soc_mixer_control *mc =
432 (struct soc_mixer_control *)kcontrol->private_value; 432 (struct soc_mixer_control *)kcontrol->private_value;
@@ -466,7 +466,7 @@ static int max98090_get_enab_tlv(struct snd_kcontrol *kcontrol,
466static int max98090_put_enab_tlv(struct snd_kcontrol *kcontrol, 466static int max98090_put_enab_tlv(struct snd_kcontrol *kcontrol,
467 struct snd_ctl_elem_value *ucontrol) 467 struct snd_ctl_elem_value *ucontrol)
468{ 468{
469 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 469 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
470 struct max98090_priv *max98090 = snd_soc_codec_get_drvdata(codec); 470 struct max98090_priv *max98090 = snd_soc_codec_get_drvdata(codec);
471 struct soc_mixer_control *mc = 471 struct soc_mixer_control *mc =
472 (struct soc_mixer_control *)kcontrol->private_value; 472 (struct soc_mixer_control *)kcontrol->private_value;
diff --git a/sound/soc/codecs/max98095.c b/sound/soc/codecs/max98095.c
index 03f0536e6f61..5d4c621dbf99 100644
--- a/sound/soc/codecs/max98095.c
+++ b/sound/soc/codecs/max98095.c
@@ -612,7 +612,7 @@ static SOC_ENUM_SINGLE_DECL(max98095_dai3_dac_filter_enum,
612static int max98095_mic1pre_set(struct snd_kcontrol *kcontrol, 612static int max98095_mic1pre_set(struct snd_kcontrol *kcontrol,
613 struct snd_ctl_elem_value *ucontrol) 613 struct snd_ctl_elem_value *ucontrol)
614{ 614{
615 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 615 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
616 struct max98095_priv *max98095 = snd_soc_codec_get_drvdata(codec); 616 struct max98095_priv *max98095 = snd_soc_codec_get_drvdata(codec);
617 unsigned int sel = ucontrol->value.integer.value[0]; 617 unsigned int sel = ucontrol->value.integer.value[0];
618 618
@@ -626,7 +626,7 @@ static int max98095_mic1pre_set(struct snd_kcontrol *kcontrol,
626static int max98095_mic1pre_get(struct snd_kcontrol *kcontrol, 626static int max98095_mic1pre_get(struct snd_kcontrol *kcontrol,
627 struct snd_ctl_elem_value *ucontrol) 627 struct snd_ctl_elem_value *ucontrol)
628{ 628{
629 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 629 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
630 struct max98095_priv *max98095 = snd_soc_codec_get_drvdata(codec); 630 struct max98095_priv *max98095 = snd_soc_codec_get_drvdata(codec);
631 631
632 ucontrol->value.integer.value[0] = max98095->mic1pre; 632 ucontrol->value.integer.value[0] = max98095->mic1pre;
@@ -636,7 +636,7 @@ static int max98095_mic1pre_get(struct snd_kcontrol *kcontrol,
636static int max98095_mic2pre_set(struct snd_kcontrol *kcontrol, 636static int max98095_mic2pre_set(struct snd_kcontrol *kcontrol,
637 struct snd_ctl_elem_value *ucontrol) 637 struct snd_ctl_elem_value *ucontrol)
638{ 638{
639 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 639 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
640 struct max98095_priv *max98095 = snd_soc_codec_get_drvdata(codec); 640 struct max98095_priv *max98095 = snd_soc_codec_get_drvdata(codec);
641 unsigned int sel = ucontrol->value.integer.value[0]; 641 unsigned int sel = ucontrol->value.integer.value[0];
642 642
@@ -650,7 +650,7 @@ static int max98095_mic2pre_set(struct snd_kcontrol *kcontrol,
650static int max98095_mic2pre_get(struct snd_kcontrol *kcontrol, 650static int max98095_mic2pre_get(struct snd_kcontrol *kcontrol,
651 struct snd_ctl_elem_value *ucontrol) 651 struct snd_ctl_elem_value *ucontrol)
652{ 652{
653 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 653 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
654 struct max98095_priv *max98095 = snd_soc_codec_get_drvdata(codec); 654 struct max98095_priv *max98095 = snd_soc_codec_get_drvdata(codec);
655 655
656 ucontrol->value.integer.value[0] = max98095->mic2pre; 656 ucontrol->value.integer.value[0] = max98095->mic2pre;
@@ -1737,7 +1737,7 @@ static int max98095_get_eq_channel(const char *name)
1737static int max98095_put_eq_enum(struct snd_kcontrol *kcontrol, 1737static int max98095_put_eq_enum(struct snd_kcontrol *kcontrol,
1738 struct snd_ctl_elem_value *ucontrol) 1738 struct snd_ctl_elem_value *ucontrol)
1739{ 1739{
1740 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 1740 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
1741 struct max98095_priv *max98095 = snd_soc_codec_get_drvdata(codec); 1741 struct max98095_priv *max98095 = snd_soc_codec_get_drvdata(codec);
1742 struct max98095_pdata *pdata = max98095->pdata; 1742 struct max98095_pdata *pdata = max98095->pdata;
1743 int channel = max98095_get_eq_channel(kcontrol->id.name); 1743 int channel = max98095_get_eq_channel(kcontrol->id.name);
@@ -1801,7 +1801,7 @@ static int max98095_put_eq_enum(struct snd_kcontrol *kcontrol,
1801static int max98095_get_eq_enum(struct snd_kcontrol *kcontrol, 1801static int max98095_get_eq_enum(struct snd_kcontrol *kcontrol,
1802 struct snd_ctl_elem_value *ucontrol) 1802 struct snd_ctl_elem_value *ucontrol)
1803{ 1803{
1804 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 1804 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
1805 struct max98095_priv *max98095 = snd_soc_codec_get_drvdata(codec); 1805 struct max98095_priv *max98095 = snd_soc_codec_get_drvdata(codec);
1806 int channel = max98095_get_eq_channel(kcontrol->id.name); 1806 int channel = max98095_get_eq_channel(kcontrol->id.name);
1807 struct max98095_cdata *cdata; 1807 struct max98095_cdata *cdata;
@@ -1891,7 +1891,7 @@ static int max98095_get_bq_channel(struct snd_soc_codec *codec,
1891static int max98095_put_bq_enum(struct snd_kcontrol *kcontrol, 1891static int max98095_put_bq_enum(struct snd_kcontrol *kcontrol,
1892 struct snd_ctl_elem_value *ucontrol) 1892 struct snd_ctl_elem_value *ucontrol)
1893{ 1893{
1894 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 1894 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
1895 struct max98095_priv *max98095 = snd_soc_codec_get_drvdata(codec); 1895 struct max98095_priv *max98095 = snd_soc_codec_get_drvdata(codec);
1896 struct max98095_pdata *pdata = max98095->pdata; 1896 struct max98095_pdata *pdata = max98095->pdata;
1897 int channel = max98095_get_bq_channel(codec, kcontrol->id.name); 1897 int channel = max98095_get_bq_channel(codec, kcontrol->id.name);
@@ -1952,7 +1952,7 @@ static int max98095_put_bq_enum(struct snd_kcontrol *kcontrol,
1952static int max98095_get_bq_enum(struct snd_kcontrol *kcontrol, 1952static int max98095_get_bq_enum(struct snd_kcontrol *kcontrol,
1953 struct snd_ctl_elem_value *ucontrol) 1953 struct snd_ctl_elem_value *ucontrol)
1954{ 1954{
1955 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 1955 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
1956 struct max98095_priv *max98095 = snd_soc_codec_get_drvdata(codec); 1956 struct max98095_priv *max98095 = snd_soc_codec_get_drvdata(codec);
1957 int channel = max98095_get_bq_channel(codec, kcontrol->id.name); 1957 int channel = max98095_get_bq_channel(codec, kcontrol->id.name);
1958 struct max98095_cdata *cdata; 1958 struct max98095_cdata *cdata;
diff --git a/sound/soc/codecs/pcm1681.c b/sound/soc/codecs/pcm1681.c
index e427544183d7..a722a023c262 100644
--- a/sound/soc/codecs/pcm1681.c
+++ b/sound/soc/codecs/pcm1681.c
@@ -115,7 +115,7 @@ static int pcm1681_set_deemph(struct snd_soc_codec *codec)
115static int pcm1681_get_deemph(struct snd_kcontrol *kcontrol, 115static int pcm1681_get_deemph(struct snd_kcontrol *kcontrol,
116 struct snd_ctl_elem_value *ucontrol) 116 struct snd_ctl_elem_value *ucontrol)
117{ 117{
118 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 118 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
119 struct pcm1681_private *priv = snd_soc_codec_get_drvdata(codec); 119 struct pcm1681_private *priv = snd_soc_codec_get_drvdata(codec);
120 120
121 ucontrol->value.enumerated.item[0] = priv->deemph; 121 ucontrol->value.enumerated.item[0] = priv->deemph;
@@ -126,7 +126,7 @@ static int pcm1681_get_deemph(struct snd_kcontrol *kcontrol,
126static int pcm1681_put_deemph(struct snd_kcontrol *kcontrol, 126static int pcm1681_put_deemph(struct snd_kcontrol *kcontrol,
127 struct snd_ctl_elem_value *ucontrol) 127 struct snd_ctl_elem_value *ucontrol)
128{ 128{
129 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 129 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
130 struct pcm1681_private *priv = snd_soc_codec_get_drvdata(codec); 130 struct pcm1681_private *priv = snd_soc_codec_get_drvdata(codec);
131 131
132 priv->deemph = ucontrol->value.enumerated.item[0]; 132 priv->deemph = ucontrol->value.enumerated.item[0];
diff --git a/sound/soc/codecs/rt5631.c b/sound/soc/codecs/rt5631.c
index d4c229f0233f..30e234708579 100644
--- a/sound/soc/codecs/rt5631.c
+++ b/sound/soc/codecs/rt5631.c
@@ -188,7 +188,7 @@ static unsigned int mic_bst_tlv[] = {
188static int rt5631_dmic_get(struct snd_kcontrol *kcontrol, 188static int rt5631_dmic_get(struct snd_kcontrol *kcontrol,
189 struct snd_ctl_elem_value *ucontrol) 189 struct snd_ctl_elem_value *ucontrol)
190{ 190{
191 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 191 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
192 struct rt5631_priv *rt5631 = snd_soc_codec_get_drvdata(codec); 192 struct rt5631_priv *rt5631 = snd_soc_codec_get_drvdata(codec);
193 193
194 ucontrol->value.integer.value[0] = rt5631->dmic_used_flag; 194 ucontrol->value.integer.value[0] = rt5631->dmic_used_flag;
@@ -199,7 +199,7 @@ static int rt5631_dmic_get(struct snd_kcontrol *kcontrol,
199static int rt5631_dmic_put(struct snd_kcontrol *kcontrol, 199static int rt5631_dmic_put(struct snd_kcontrol *kcontrol,
200 struct snd_ctl_elem_value *ucontrol) 200 struct snd_ctl_elem_value *ucontrol)
201{ 201{
202 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 202 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
203 struct rt5631_priv *rt5631 = snd_soc_codec_get_drvdata(codec); 203 struct rt5631_priv *rt5631 = snd_soc_codec_get_drvdata(codec);
204 204
205 rt5631->dmic_used_flag = ucontrol->value.integer.value[0]; 205 rt5631->dmic_used_flag = ucontrol->value.integer.value[0];
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
index d3ed1be5a186..b56caefcf664 100644
--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -296,7 +296,7 @@ static int dac_info_volsw(struct snd_kcontrol *kcontrol,
296static int dac_get_volsw(struct snd_kcontrol *kcontrol, 296static int dac_get_volsw(struct snd_kcontrol *kcontrol,
297 struct snd_ctl_elem_value *ucontrol) 297 struct snd_ctl_elem_value *ucontrol)
298{ 298{
299 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 299 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
300 int reg; 300 int reg;
301 int l; 301 int l;
302 int r; 302 int r;
@@ -349,7 +349,7 @@ static int dac_get_volsw(struct snd_kcontrol *kcontrol,
349static int dac_put_volsw(struct snd_kcontrol *kcontrol, 349static int dac_put_volsw(struct snd_kcontrol *kcontrol,
350 struct snd_ctl_elem_value *ucontrol) 350 struct snd_ctl_elem_value *ucontrol)
351{ 351{
352 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 352 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
353 int reg; 353 int reg;
354 int l; 354 int l;
355 int r; 355 int r;
diff --git a/sound/soc/codecs/sta32x.c b/sound/soc/codecs/sta32x.c
index 12577749b17b..0579d187135b 100644
--- a/sound/soc/codecs/sta32x.c
+++ b/sound/soc/codecs/sta32x.c
@@ -243,7 +243,7 @@ static int sta32x_coefficient_info(struct snd_kcontrol *kcontrol,
243static int sta32x_coefficient_get(struct snd_kcontrol *kcontrol, 243static int sta32x_coefficient_get(struct snd_kcontrol *kcontrol,
244 struct snd_ctl_elem_value *ucontrol) 244 struct snd_ctl_elem_value *ucontrol)
245{ 245{
246 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 246 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
247 int numcoef = kcontrol->private_value >> 16; 247 int numcoef = kcontrol->private_value >> 16;
248 int index = kcontrol->private_value & 0xffff; 248 int index = kcontrol->private_value & 0xffff;
249 unsigned int cfud; 249 unsigned int cfud;
@@ -272,7 +272,7 @@ static int sta32x_coefficient_get(struct snd_kcontrol *kcontrol,
272static int sta32x_coefficient_put(struct snd_kcontrol *kcontrol, 272static int sta32x_coefficient_put(struct snd_kcontrol *kcontrol,
273 struct snd_ctl_elem_value *ucontrol) 273 struct snd_ctl_elem_value *ucontrol)
274{ 274{
275 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 275 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
276 struct sta32x_priv *sta32x = snd_soc_codec_get_drvdata(codec); 276 struct sta32x_priv *sta32x = snd_soc_codec_get_drvdata(codec);
277 int numcoef = kcontrol->private_value >> 16; 277 int numcoef = kcontrol->private_value >> 16;
278 int index = kcontrol->private_value & 0xffff; 278 int index = kcontrol->private_value & 0xffff;
diff --git a/sound/soc/codecs/tas5086.c b/sound/soc/codecs/tas5086.c
index a895a5e4bdf2..d48491a4a19d 100644
--- a/sound/soc/codecs/tas5086.c
+++ b/sound/soc/codecs/tas5086.c
@@ -272,7 +272,7 @@ static int tas5086_set_deemph(struct snd_soc_codec *codec)
272static int tas5086_get_deemph(struct snd_kcontrol *kcontrol, 272static int tas5086_get_deemph(struct snd_kcontrol *kcontrol,
273 struct snd_ctl_elem_value *ucontrol) 273 struct snd_ctl_elem_value *ucontrol)
274{ 274{
275 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 275 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
276 struct tas5086_private *priv = snd_soc_codec_get_drvdata(codec); 276 struct tas5086_private *priv = snd_soc_codec_get_drvdata(codec);
277 277
278 ucontrol->value.enumerated.item[0] = priv->deemph; 278 ucontrol->value.enumerated.item[0] = priv->deemph;
@@ -283,7 +283,7 @@ static int tas5086_get_deemph(struct snd_kcontrol *kcontrol,
283static int tas5086_put_deemph(struct snd_kcontrol *kcontrol, 283static int tas5086_put_deemph(struct snd_kcontrol *kcontrol,
284 struct snd_ctl_elem_value *ucontrol) 284 struct snd_ctl_elem_value *ucontrol)
285{ 285{
286 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 286 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
287 struct tas5086_private *priv = snd_soc_codec_get_drvdata(codec); 287 struct tas5086_private *priv = snd_soc_codec_get_drvdata(codec);
288 288
289 priv->deemph = ucontrol->value.enumerated.item[0]; 289 priv->deemph = ucontrol->value.enumerated.item[0];
diff --git a/sound/soc/codecs/tlv320aic23.c b/sound/soc/codecs/tlv320aic23.c
index 20864ee8793b..686b8b85b956 100644
--- a/sound/soc/codecs/tlv320aic23.c
+++ b/sound/soc/codecs/tlv320aic23.c
@@ -82,7 +82,7 @@ static const DECLARE_TLV_DB_SCALE(sidetone_vol_tlv, -1800, 300, 0);
82static int snd_soc_tlv320aic23_put_volsw(struct snd_kcontrol *kcontrol, 82static int snd_soc_tlv320aic23_put_volsw(struct snd_kcontrol *kcontrol,
83 struct snd_ctl_elem_value *ucontrol) 83 struct snd_ctl_elem_value *ucontrol)
84{ 84{
85 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 85 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
86 u16 val, reg; 86 u16 val, reg;
87 87
88 val = (ucontrol->value.integer.value[0] & 0x07); 88 val = (ucontrol->value.integer.value[0] & 0x07);
@@ -105,7 +105,7 @@ static int snd_soc_tlv320aic23_put_volsw(struct snd_kcontrol *kcontrol,
105static int snd_soc_tlv320aic23_get_volsw(struct snd_kcontrol *kcontrol, 105static int snd_soc_tlv320aic23_get_volsw(struct snd_kcontrol *kcontrol,
106 struct snd_ctl_elem_value *ucontrol) 106 struct snd_ctl_elem_value *ucontrol)
107{ 107{
108 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 108 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
109 u16 val; 109 u16 val;
110 110
111 val = snd_soc_read(codec, TLV320AIC23_ANLG) & (0x1C0); 111 val = snd_soc_read(codec, TLV320AIC23_ANLG) & (0x1C0);
diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c
index 6bfc8a17331b..517055ab65ef 100644
--- a/sound/soc/codecs/tlv320dac33.c
+++ b/sound/soc/codecs/tlv320dac33.c
@@ -442,7 +442,7 @@ static int dac33_playback_event(struct snd_soc_dapm_widget *w,
442static int dac33_get_fifo_mode(struct snd_kcontrol *kcontrol, 442static int dac33_get_fifo_mode(struct snd_kcontrol *kcontrol,
443 struct snd_ctl_elem_value *ucontrol) 443 struct snd_ctl_elem_value *ucontrol)
444{ 444{
445 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 445 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
446 struct tlv320dac33_priv *dac33 = snd_soc_codec_get_drvdata(codec); 446 struct tlv320dac33_priv *dac33 = snd_soc_codec_get_drvdata(codec);
447 447
448 ucontrol->value.integer.value[0] = dac33->fifo_mode; 448 ucontrol->value.integer.value[0] = dac33->fifo_mode;
@@ -453,7 +453,7 @@ static int dac33_get_fifo_mode(struct snd_kcontrol *kcontrol,
453static int dac33_set_fifo_mode(struct snd_kcontrol *kcontrol, 453static int dac33_set_fifo_mode(struct snd_kcontrol *kcontrol,
454 struct snd_ctl_elem_value *ucontrol) 454 struct snd_ctl_elem_value *ucontrol)
455{ 455{
456 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 456 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
457 struct tlv320dac33_priv *dac33 = snd_soc_codec_get_drvdata(codec); 457 struct tlv320dac33_priv *dac33 = snd_soc_codec_get_drvdata(codec);
458 int ret = 0; 458 int ret = 0;
459 459
diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c
index 975e0f760ac1..69e12a311ba2 100644
--- a/sound/soc/codecs/twl4030.c
+++ b/sound/soc/codecs/twl4030.c
@@ -830,7 +830,7 @@ static int snd_soc_get_volsw_twl4030(struct snd_kcontrol *kcontrol,
830{ 830{
831 struct soc_mixer_control *mc = 831 struct soc_mixer_control *mc =
832 (struct soc_mixer_control *)kcontrol->private_value; 832 (struct soc_mixer_control *)kcontrol->private_value;
833 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 833 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
834 unsigned int reg = mc->reg; 834 unsigned int reg = mc->reg;
835 unsigned int shift = mc->shift; 835 unsigned int shift = mc->shift;
836 unsigned int rshift = mc->rshift; 836 unsigned int rshift = mc->rshift;
@@ -859,7 +859,7 @@ static int snd_soc_put_volsw_twl4030(struct snd_kcontrol *kcontrol,
859{ 859{
860 struct soc_mixer_control *mc = 860 struct soc_mixer_control *mc =
861 (struct soc_mixer_control *)kcontrol->private_value; 861 (struct soc_mixer_control *)kcontrol->private_value;
862 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 862 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
863 unsigned int reg = mc->reg; 863 unsigned int reg = mc->reg;
864 unsigned int shift = mc->shift; 864 unsigned int shift = mc->shift;
865 unsigned int rshift = mc->rshift; 865 unsigned int rshift = mc->rshift;
@@ -888,7 +888,7 @@ static int snd_soc_get_volsw_r2_twl4030(struct snd_kcontrol *kcontrol,
888{ 888{
889 struct soc_mixer_control *mc = 889 struct soc_mixer_control *mc =
890 (struct soc_mixer_control *)kcontrol->private_value; 890 (struct soc_mixer_control *)kcontrol->private_value;
891 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 891 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
892 unsigned int reg = mc->reg; 892 unsigned int reg = mc->reg;
893 unsigned int reg2 = mc->rreg; 893 unsigned int reg2 = mc->rreg;
894 unsigned int shift = mc->shift; 894 unsigned int shift = mc->shift;
@@ -915,7 +915,7 @@ static int snd_soc_put_volsw_r2_twl4030(struct snd_kcontrol *kcontrol,
915{ 915{
916 struct soc_mixer_control *mc = 916 struct soc_mixer_control *mc =
917 (struct soc_mixer_control *)kcontrol->private_value; 917 (struct soc_mixer_control *)kcontrol->private_value;
918 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 918 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
919 unsigned int reg = mc->reg; 919 unsigned int reg = mc->reg;
920 unsigned int reg2 = mc->rreg; 920 unsigned int reg2 = mc->rreg;
921 unsigned int shift = mc->shift; 921 unsigned int shift = mc->shift;
@@ -956,7 +956,7 @@ static SOC_ENUM_SINGLE_DECL(twl4030_op_modes_enum,
956static int snd_soc_put_twl4030_opmode_enum_double(struct snd_kcontrol *kcontrol, 956static int snd_soc_put_twl4030_opmode_enum_double(struct snd_kcontrol *kcontrol,
957 struct snd_ctl_elem_value *ucontrol) 957 struct snd_ctl_elem_value *ucontrol)
958{ 958{
959 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 959 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
960 struct twl4030_priv *twl4030 = snd_soc_codec_get_drvdata(codec); 960 struct twl4030_priv *twl4030 = snd_soc_codec_get_drvdata(codec);
961 961
962 if (twl4030->configured) { 962 if (twl4030->configured) {
diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c
index bd3a20647fdf..0f6067f04e29 100644
--- a/sound/soc/codecs/twl6040.c
+++ b/sound/soc/codecs/twl6040.c
@@ -484,7 +484,7 @@ static SOC_ENUM_SINGLE_EXT_DECL(twl6040_power_mode_enum,
484static int twl6040_headset_power_get_enum(struct snd_kcontrol *kcontrol, 484static int twl6040_headset_power_get_enum(struct snd_kcontrol *kcontrol,
485 struct snd_ctl_elem_value *ucontrol) 485 struct snd_ctl_elem_value *ucontrol)
486{ 486{
487 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 487 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
488 struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec); 488 struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec);
489 489
490 ucontrol->value.enumerated.item[0] = priv->hs_power_mode; 490 ucontrol->value.enumerated.item[0] = priv->hs_power_mode;
@@ -495,7 +495,7 @@ static int twl6040_headset_power_get_enum(struct snd_kcontrol *kcontrol,
495static int twl6040_headset_power_put_enum(struct snd_kcontrol *kcontrol, 495static int twl6040_headset_power_put_enum(struct snd_kcontrol *kcontrol,
496 struct snd_ctl_elem_value *ucontrol) 496 struct snd_ctl_elem_value *ucontrol)
497{ 497{
498 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 498 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
499 struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec); 499 struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec);
500 int high_perf = ucontrol->value.enumerated.item[0]; 500 int high_perf = ucontrol->value.enumerated.item[0];
501 int ret = 0; 501 int ret = 0;
@@ -512,7 +512,7 @@ static int twl6040_headset_power_put_enum(struct snd_kcontrol *kcontrol,
512static int twl6040_pll_get_enum(struct snd_kcontrol *kcontrol, 512static int twl6040_pll_get_enum(struct snd_kcontrol *kcontrol,
513 struct snd_ctl_elem_value *ucontrol) 513 struct snd_ctl_elem_value *ucontrol)
514{ 514{
515 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 515 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
516 struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec); 516 struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec);
517 517
518 ucontrol->value.enumerated.item[0] = priv->pll_power_mode; 518 ucontrol->value.enumerated.item[0] = priv->pll_power_mode;
@@ -523,7 +523,7 @@ static int twl6040_pll_get_enum(struct snd_kcontrol *kcontrol,
523static int twl6040_pll_put_enum(struct snd_kcontrol *kcontrol, 523static int twl6040_pll_put_enum(struct snd_kcontrol *kcontrol,
524 struct snd_ctl_elem_value *ucontrol) 524 struct snd_ctl_elem_value *ucontrol)
525{ 525{
526 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 526 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
527 struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec); 527 struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec);
528 528
529 priv->pll_power_mode = ucontrol->value.enumerated.item[0]; 529 priv->pll_power_mode = ucontrol->value.enumerated.item[0];
diff --git a/sound/soc/codecs/wl1273.c b/sound/soc/codecs/wl1273.c
index 6be5f80b65f1..4ead0dc02b87 100644
--- a/sound/soc/codecs/wl1273.c
+++ b/sound/soc/codecs/wl1273.c
@@ -172,7 +172,7 @@ out:
172static int snd_wl1273_get_audio_route(struct snd_kcontrol *kcontrol, 172static int snd_wl1273_get_audio_route(struct snd_kcontrol *kcontrol,
173 struct snd_ctl_elem_value *ucontrol) 173 struct snd_ctl_elem_value *ucontrol)
174{ 174{
175 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 175 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
176 struct wl1273_priv *wl1273 = snd_soc_codec_get_drvdata(codec); 176 struct wl1273_priv *wl1273 = snd_soc_codec_get_drvdata(codec);
177 177
178 ucontrol->value.integer.value[0] = wl1273->mode; 178 ucontrol->value.integer.value[0] = wl1273->mode;
@@ -190,7 +190,7 @@ static const char * const wl1273_audio_route[] = { "Bt", "FmRx", "FmTx" };
190static int snd_wl1273_set_audio_route(struct snd_kcontrol *kcontrol, 190static int snd_wl1273_set_audio_route(struct snd_kcontrol *kcontrol,
191 struct snd_ctl_elem_value *ucontrol) 191 struct snd_ctl_elem_value *ucontrol)
192{ 192{
193 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 193 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
194 struct wl1273_priv *wl1273 = snd_soc_codec_get_drvdata(codec); 194 struct wl1273_priv *wl1273 = snd_soc_codec_get_drvdata(codec);
195 195
196 if (wl1273->mode == ucontrol->value.integer.value[0]) 196 if (wl1273->mode == ucontrol->value.integer.value[0])
@@ -214,7 +214,7 @@ static SOC_ENUM_SINGLE_EXT_DECL(wl1273_enum, wl1273_audio_route);
214static int snd_wl1273_fm_audio_get(struct snd_kcontrol *kcontrol, 214static int snd_wl1273_fm_audio_get(struct snd_kcontrol *kcontrol,
215 struct snd_ctl_elem_value *ucontrol) 215 struct snd_ctl_elem_value *ucontrol)
216{ 216{
217 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 217 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
218 struct wl1273_priv *wl1273 = snd_soc_codec_get_drvdata(codec); 218 struct wl1273_priv *wl1273 = snd_soc_codec_get_drvdata(codec);
219 219
220 dev_dbg(codec->dev, "%s: enter.\n", __func__); 220 dev_dbg(codec->dev, "%s: enter.\n", __func__);
@@ -227,7 +227,7 @@ static int snd_wl1273_fm_audio_get(struct snd_kcontrol *kcontrol,
227static int snd_wl1273_fm_audio_put(struct snd_kcontrol *kcontrol, 227static int snd_wl1273_fm_audio_put(struct snd_kcontrol *kcontrol,
228 struct snd_ctl_elem_value *ucontrol) 228 struct snd_ctl_elem_value *ucontrol)
229{ 229{
230 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 230 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
231 struct wl1273_priv *wl1273 = snd_soc_codec_get_drvdata(codec); 231 struct wl1273_priv *wl1273 = snd_soc_codec_get_drvdata(codec);
232 int val, r = 0; 232 int val, r = 0;
233 233
@@ -251,7 +251,7 @@ static SOC_ENUM_SINGLE_EXT_DECL(wl1273_audio_enum, wl1273_audio_strings);
251static int snd_wl1273_fm_volume_get(struct snd_kcontrol *kcontrol, 251static int snd_wl1273_fm_volume_get(struct snd_kcontrol *kcontrol,
252 struct snd_ctl_elem_value *ucontrol) 252 struct snd_ctl_elem_value *ucontrol)
253{ 253{
254 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 254 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
255 struct wl1273_priv *wl1273 = snd_soc_codec_get_drvdata(codec); 255 struct wl1273_priv *wl1273 = snd_soc_codec_get_drvdata(codec);
256 256
257 dev_dbg(codec->dev, "%s: enter.\n", __func__); 257 dev_dbg(codec->dev, "%s: enter.\n", __func__);
@@ -264,7 +264,7 @@ static int snd_wl1273_fm_volume_get(struct snd_kcontrol *kcontrol,
264static int snd_wl1273_fm_volume_put(struct snd_kcontrol *kcontrol, 264static int snd_wl1273_fm_volume_put(struct snd_kcontrol *kcontrol,
265 struct snd_ctl_elem_value *ucontrol) 265 struct snd_ctl_elem_value *ucontrol)
266{ 266{
267 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 267 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
268 struct wl1273_priv *wl1273 = snd_soc_codec_get_drvdata(codec); 268 struct wl1273_priv *wl1273 = snd_soc_codec_get_drvdata(codec);
269 int r; 269 int r;
270 270
diff --git a/sound/soc/codecs/wm2000.c b/sound/soc/codecs/wm2000.c
index 83a2c872925c..a4c352cc3464 100644
--- a/sound/soc/codecs/wm2000.c
+++ b/sound/soc/codecs/wm2000.c
@@ -607,7 +607,7 @@ static int wm2000_anc_set_mode(struct wm2000_priv *wm2000)
607static int wm2000_anc_mode_get(struct snd_kcontrol *kcontrol, 607static int wm2000_anc_mode_get(struct snd_kcontrol *kcontrol,
608 struct snd_ctl_elem_value *ucontrol) 608 struct snd_ctl_elem_value *ucontrol)
609{ 609{
610 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 610 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
611 struct wm2000_priv *wm2000 = dev_get_drvdata(codec->dev); 611 struct wm2000_priv *wm2000 = dev_get_drvdata(codec->dev);
612 612
613 ucontrol->value.enumerated.item[0] = wm2000->anc_active; 613 ucontrol->value.enumerated.item[0] = wm2000->anc_active;
@@ -618,7 +618,7 @@ static int wm2000_anc_mode_get(struct snd_kcontrol *kcontrol,
618static int wm2000_anc_mode_put(struct snd_kcontrol *kcontrol, 618static int wm2000_anc_mode_put(struct snd_kcontrol *kcontrol,
619 struct snd_ctl_elem_value *ucontrol) 619 struct snd_ctl_elem_value *ucontrol)
620{ 620{
621 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 621 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
622 struct wm2000_priv *wm2000 = dev_get_drvdata(codec->dev); 622 struct wm2000_priv *wm2000 = dev_get_drvdata(codec->dev);
623 int anc_active = ucontrol->value.enumerated.item[0]; 623 int anc_active = ucontrol->value.enumerated.item[0];
624 int ret; 624 int ret;
@@ -640,7 +640,7 @@ static int wm2000_anc_mode_put(struct snd_kcontrol *kcontrol,
640static int wm2000_speaker_get(struct snd_kcontrol *kcontrol, 640static int wm2000_speaker_get(struct snd_kcontrol *kcontrol,
641 struct snd_ctl_elem_value *ucontrol) 641 struct snd_ctl_elem_value *ucontrol)
642{ 642{
643 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 643 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
644 struct wm2000_priv *wm2000 = dev_get_drvdata(codec->dev); 644 struct wm2000_priv *wm2000 = dev_get_drvdata(codec->dev);
645 645
646 ucontrol->value.enumerated.item[0] = wm2000->spk_ena; 646 ucontrol->value.enumerated.item[0] = wm2000->spk_ena;
@@ -651,7 +651,7 @@ static int wm2000_speaker_get(struct snd_kcontrol *kcontrol,
651static int wm2000_speaker_put(struct snd_kcontrol *kcontrol, 651static int wm2000_speaker_put(struct snd_kcontrol *kcontrol,
652 struct snd_ctl_elem_value *ucontrol) 652 struct snd_ctl_elem_value *ucontrol)
653{ 653{
654 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 654 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
655 struct wm2000_priv *wm2000 = dev_get_drvdata(codec->dev); 655 struct wm2000_priv *wm2000 = dev_get_drvdata(codec->dev);
656 int val = ucontrol->value.enumerated.item[0]; 656 int val = ucontrol->value.enumerated.item[0];
657 int ret; 657 int ret;
diff --git a/sound/soc/codecs/wm8350.c b/sound/soc/codecs/wm8350.c
index 757256bf7672..42a72b2404d5 100644
--- a/sound/soc/codecs/wm8350.c
+++ b/sound/soc/codecs/wm8350.c
@@ -302,7 +302,7 @@ static int pga_event(struct snd_soc_dapm_widget *w,
302static int wm8350_put_volsw_2r_vu(struct snd_kcontrol *kcontrol, 302static int wm8350_put_volsw_2r_vu(struct snd_kcontrol *kcontrol,
303 struct snd_ctl_elem_value *ucontrol) 303 struct snd_ctl_elem_value *ucontrol)
304{ 304{
305 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 305 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
306 struct wm8350_data *wm8350_priv = snd_soc_codec_get_drvdata(codec); 306 struct wm8350_data *wm8350_priv = snd_soc_codec_get_drvdata(codec);
307 struct wm8350_output *out = NULL; 307 struct wm8350_output *out = NULL;
308 struct soc_mixer_control *mc = 308 struct soc_mixer_control *mc =
@@ -345,7 +345,7 @@ static int wm8350_put_volsw_2r_vu(struct snd_kcontrol *kcontrol,
345static int wm8350_get_volsw_2r(struct snd_kcontrol *kcontrol, 345static int wm8350_get_volsw_2r(struct snd_kcontrol *kcontrol,
346 struct snd_ctl_elem_value *ucontrol) 346 struct snd_ctl_elem_value *ucontrol)
347{ 347{
348 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 348 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
349 struct wm8350_data *wm8350_priv = snd_soc_codec_get_drvdata(codec); 349 struct wm8350_data *wm8350_priv = snd_soc_codec_get_drvdata(codec);
350 struct wm8350_output *out1 = &wm8350_priv->out1; 350 struct wm8350_output *out1 = &wm8350_priv->out1;
351 struct wm8350_output *out2 = &wm8350_priv->out2; 351 struct wm8350_output *out2 = &wm8350_priv->out2;
diff --git a/sound/soc/codecs/wm8400.c b/sound/soc/codecs/wm8400.c
index 146564feaea0..edfdbcd9d316 100644
--- a/sound/soc/codecs/wm8400.c
+++ b/sound/soc/codecs/wm8400.c
@@ -93,7 +93,7 @@ static const DECLARE_TLV_DB_SCALE(out_sidetone_tlv, -3600, 0, 0);
93static int wm8400_outpga_put_volsw_vu(struct snd_kcontrol *kcontrol, 93static int wm8400_outpga_put_volsw_vu(struct snd_kcontrol *kcontrol,
94 struct snd_ctl_elem_value *ucontrol) 94 struct snd_ctl_elem_value *ucontrol)
95{ 95{
96 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 96 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
97 struct soc_mixer_control *mc = 97 struct soc_mixer_control *mc =
98 (struct soc_mixer_control *)kcontrol->private_value; 98 (struct soc_mixer_control *)kcontrol->private_value;
99 int reg = mc->reg; 99 int reg = mc->reg;
diff --git a/sound/soc/codecs/wm8580.c b/sound/soc/codecs/wm8580.c
index af7ed8b5d4e1..7665ff6aea6d 100644
--- a/sound/soc/codecs/wm8580.c
+++ b/sound/soc/codecs/wm8580.c
@@ -252,7 +252,7 @@ static int wm8580_out_vu(struct snd_kcontrol *kcontrol,
252{ 252{
253 struct soc_mixer_control *mc = 253 struct soc_mixer_control *mc =
254 (struct soc_mixer_control *)kcontrol->private_value; 254 (struct soc_mixer_control *)kcontrol->private_value;
255 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 255 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
256 struct wm8580_priv *wm8580 = snd_soc_codec_get_drvdata(codec); 256 struct wm8580_priv *wm8580 = snd_soc_codec_get_drvdata(codec);
257 unsigned int reg = mc->reg; 257 unsigned int reg = mc->reg;
258 unsigned int reg2 = mc->rreg; 258 unsigned int reg2 = mc->rreg;
diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c
index d74f43975b90..763b265d9528 100644
--- a/sound/soc/codecs/wm8731.c
+++ b/sound/soc/codecs/wm8731.c
@@ -119,7 +119,7 @@ static int wm8731_set_deemph(struct snd_soc_codec *codec)
119static int wm8731_get_deemph(struct snd_kcontrol *kcontrol, 119static int wm8731_get_deemph(struct snd_kcontrol *kcontrol,
120 struct snd_ctl_elem_value *ucontrol) 120 struct snd_ctl_elem_value *ucontrol)
121{ 121{
122 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 122 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
123 struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec); 123 struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec);
124 124
125 ucontrol->value.enumerated.item[0] = wm8731->deemph; 125 ucontrol->value.enumerated.item[0] = wm8731->deemph;
@@ -130,7 +130,7 @@ static int wm8731_get_deemph(struct snd_kcontrol *kcontrol,
130static int wm8731_put_deemph(struct snd_kcontrol *kcontrol, 130static int wm8731_put_deemph(struct snd_kcontrol *kcontrol,
131 struct snd_ctl_elem_value *ucontrol) 131 struct snd_ctl_elem_value *ucontrol)
132{ 132{
133 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 133 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
134 struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec); 134 struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec);
135 int deemph = ucontrol->value.enumerated.item[0]; 135 int deemph = ucontrol->value.enumerated.item[0];
136 int ret = 0; 136 int ret = 0;
diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c
index cbb8d55052a4..53e57b4049a8 100644
--- a/sound/soc/codecs/wm8753.c
+++ b/sound/soc/codecs/wm8753.c
@@ -234,7 +234,7 @@ SOC_ENUM_SINGLE(WM8753_OUTCTL, 2, 2, wm8753_rout2_phase),
234static int wm8753_get_dai(struct snd_kcontrol *kcontrol, 234static int wm8753_get_dai(struct snd_kcontrol *kcontrol,
235 struct snd_ctl_elem_value *ucontrol) 235 struct snd_ctl_elem_value *ucontrol)
236{ 236{
237 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 237 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
238 struct wm8753_priv *wm8753 = snd_soc_codec_get_drvdata(codec); 238 struct wm8753_priv *wm8753 = snd_soc_codec_get_drvdata(codec);
239 239
240 ucontrol->value.integer.value[0] = wm8753->dai_func; 240 ucontrol->value.integer.value[0] = wm8753->dai_func;
@@ -244,7 +244,7 @@ static int wm8753_get_dai(struct snd_kcontrol *kcontrol,
244static int wm8753_set_dai(struct snd_kcontrol *kcontrol, 244static int wm8753_set_dai(struct snd_kcontrol *kcontrol,
245 struct snd_ctl_elem_value *ucontrol) 245 struct snd_ctl_elem_value *ucontrol)
246{ 246{
247 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 247 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
248 struct wm8753_priv *wm8753 = snd_soc_codec_get_drvdata(codec); 248 struct wm8753_priv *wm8753 = snd_soc_codec_get_drvdata(codec);
249 u16 ioctl; 249 u16 ioctl;
250 250
diff --git a/sound/soc/codecs/wm8804.c b/sound/soc/codecs/wm8804.c
index ee76f0fb4299..589455c3bfcd 100644
--- a/sound/soc/codecs/wm8804.c
+++ b/sound/soc/codecs/wm8804.c
@@ -106,7 +106,7 @@ static int txsrc_get(struct snd_kcontrol *kcontrol,
106 struct snd_soc_codec *codec; 106 struct snd_soc_codec *codec;
107 unsigned int src; 107 unsigned int src;
108 108
109 codec = snd_kcontrol_chip(kcontrol); 109 codec = snd_soc_kcontrol_codec(kcontrol);
110 src = snd_soc_read(codec, WM8804_SPDTX4); 110 src = snd_soc_read(codec, WM8804_SPDTX4);
111 if (src & 0x40) 111 if (src & 0x40)
112 ucontrol->value.integer.value[0] = 1; 112 ucontrol->value.integer.value[0] = 1;
@@ -122,7 +122,7 @@ static int txsrc_put(struct snd_kcontrol *kcontrol,
122 struct snd_soc_codec *codec; 122 struct snd_soc_codec *codec;
123 unsigned int src, txpwr; 123 unsigned int src, txpwr;
124 124
125 codec = snd_kcontrol_chip(kcontrol); 125 codec = snd_soc_kcontrol_codec(kcontrol);
126 126
127 if (ucontrol->value.integer.value[0] != 0 127 if (ucontrol->value.integer.value[0] != 0
128 && ucontrol->value.integer.value[0] != 1) 128 && ucontrol->value.integer.value[0] != 1)
diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c
index b0084a127d18..b84940c359a1 100644
--- a/sound/soc/codecs/wm8903.c
+++ b/sound/soc/codecs/wm8903.c
@@ -439,7 +439,7 @@ static int wm8903_set_deemph(struct snd_soc_codec *codec)
439static int wm8903_get_deemph(struct snd_kcontrol *kcontrol, 439static int wm8903_get_deemph(struct snd_kcontrol *kcontrol,
440 struct snd_ctl_elem_value *ucontrol) 440 struct snd_ctl_elem_value *ucontrol)
441{ 441{
442 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 442 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
443 struct wm8903_priv *wm8903 = snd_soc_codec_get_drvdata(codec); 443 struct wm8903_priv *wm8903 = snd_soc_codec_get_drvdata(codec);
444 444
445 ucontrol->value.enumerated.item[0] = wm8903->deemph; 445 ucontrol->value.enumerated.item[0] = wm8903->deemph;
@@ -450,7 +450,7 @@ static int wm8903_get_deemph(struct snd_kcontrol *kcontrol,
450static int wm8903_put_deemph(struct snd_kcontrol *kcontrol, 450static int wm8903_put_deemph(struct snd_kcontrol *kcontrol,
451 struct snd_ctl_elem_value *ucontrol) 451 struct snd_ctl_elem_value *ucontrol)
452{ 452{
453 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 453 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
454 struct wm8903_priv *wm8903 = snd_soc_codec_get_drvdata(codec); 454 struct wm8903_priv *wm8903 = snd_soc_codec_get_drvdata(codec);
455 int deemph = ucontrol->value.enumerated.item[0]; 455 int deemph = ucontrol->value.enumerated.item[0];
456 int ret = 0; 456 int ret = 0;
diff --git a/sound/soc/codecs/wm8904.c b/sound/soc/codecs/wm8904.c
index 49c35c36935e..f7c549949c54 100644
--- a/sound/soc/codecs/wm8904.c
+++ b/sound/soc/codecs/wm8904.c
@@ -391,7 +391,7 @@ static void wm8904_set_drc(struct snd_soc_codec *codec)
391static int wm8904_put_drc_enum(struct snd_kcontrol *kcontrol, 391static int wm8904_put_drc_enum(struct snd_kcontrol *kcontrol,
392 struct snd_ctl_elem_value *ucontrol) 392 struct snd_ctl_elem_value *ucontrol)
393{ 393{
394 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 394 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
395 struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec); 395 struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec);
396 struct wm8904_pdata *pdata = wm8904->pdata; 396 struct wm8904_pdata *pdata = wm8904->pdata;
397 int value = ucontrol->value.integer.value[0]; 397 int value = ucontrol->value.integer.value[0];
@@ -409,7 +409,7 @@ static int wm8904_put_drc_enum(struct snd_kcontrol *kcontrol,
409static int wm8904_get_drc_enum(struct snd_kcontrol *kcontrol, 409static int wm8904_get_drc_enum(struct snd_kcontrol *kcontrol,
410 struct snd_ctl_elem_value *ucontrol) 410 struct snd_ctl_elem_value *ucontrol)
411{ 411{
412 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 412 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
413 struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec); 413 struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec);
414 414
415 ucontrol->value.enumerated.item[0] = wm8904->drc_cfg; 415 ucontrol->value.enumerated.item[0] = wm8904->drc_cfg;
@@ -462,7 +462,7 @@ static void wm8904_set_retune_mobile(struct snd_soc_codec *codec)
462static int wm8904_put_retune_mobile_enum(struct snd_kcontrol *kcontrol, 462static int wm8904_put_retune_mobile_enum(struct snd_kcontrol *kcontrol,
463 struct snd_ctl_elem_value *ucontrol) 463 struct snd_ctl_elem_value *ucontrol)
464{ 464{
465 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 465 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
466 struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec); 466 struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec);
467 struct wm8904_pdata *pdata = wm8904->pdata; 467 struct wm8904_pdata *pdata = wm8904->pdata;
468 int value = ucontrol->value.integer.value[0]; 468 int value = ucontrol->value.integer.value[0];
@@ -480,7 +480,7 @@ static int wm8904_put_retune_mobile_enum(struct snd_kcontrol *kcontrol,
480static int wm8904_get_retune_mobile_enum(struct snd_kcontrol *kcontrol, 480static int wm8904_get_retune_mobile_enum(struct snd_kcontrol *kcontrol,
481 struct snd_ctl_elem_value *ucontrol) 481 struct snd_ctl_elem_value *ucontrol)
482{ 482{
483 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 483 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
484 struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec); 484 struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec);
485 485
486 ucontrol->value.enumerated.item[0] = wm8904->retune_mobile_cfg; 486 ucontrol->value.enumerated.item[0] = wm8904->retune_mobile_cfg;
@@ -520,7 +520,7 @@ static int wm8904_set_deemph(struct snd_soc_codec *codec)
520static int wm8904_get_deemph(struct snd_kcontrol *kcontrol, 520static int wm8904_get_deemph(struct snd_kcontrol *kcontrol,
521 struct snd_ctl_elem_value *ucontrol) 521 struct snd_ctl_elem_value *ucontrol)
522{ 522{
523 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 523 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
524 struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec); 524 struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec);
525 525
526 ucontrol->value.enumerated.item[0] = wm8904->deemph; 526 ucontrol->value.enumerated.item[0] = wm8904->deemph;
@@ -530,7 +530,7 @@ static int wm8904_get_deemph(struct snd_kcontrol *kcontrol,
530static int wm8904_put_deemph(struct snd_kcontrol *kcontrol, 530static int wm8904_put_deemph(struct snd_kcontrol *kcontrol,
531 struct snd_ctl_elem_value *ucontrol) 531 struct snd_ctl_elem_value *ucontrol)
532{ 532{
533 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 533 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
534 struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec); 534 struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec);
535 int deemph = ucontrol->value.enumerated.item[0]; 535 int deemph = ucontrol->value.enumerated.item[0];
536 536
@@ -570,7 +570,7 @@ static SOC_ENUM_SINGLE_DECL(hpf_mode, WM8904_ADC_DIGITAL_0, 5,
570static int wm8904_adc_osr_put(struct snd_kcontrol *kcontrol, 570static int wm8904_adc_osr_put(struct snd_kcontrol *kcontrol,
571 struct snd_ctl_elem_value *ucontrol) 571 struct snd_ctl_elem_value *ucontrol)
572{ 572{
573 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 573 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
574 unsigned int val; 574 unsigned int val;
575 int ret; 575 int ret;
576 576
diff --git a/sound/soc/codecs/wm8955.c b/sound/soc/codecs/wm8955.c
index fecd4e4f4c57..7e443c4f6f85 100644
--- a/sound/soc/codecs/wm8955.c
+++ b/sound/soc/codecs/wm8955.c
@@ -390,7 +390,7 @@ static int wm8955_set_deemph(struct snd_soc_codec *codec)
390static int wm8955_get_deemph(struct snd_kcontrol *kcontrol, 390static int wm8955_get_deemph(struct snd_kcontrol *kcontrol,
391 struct snd_ctl_elem_value *ucontrol) 391 struct snd_ctl_elem_value *ucontrol)
392{ 392{
393 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 393 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
394 struct wm8955_priv *wm8955 = snd_soc_codec_get_drvdata(codec); 394 struct wm8955_priv *wm8955 = snd_soc_codec_get_drvdata(codec);
395 395
396 ucontrol->value.enumerated.item[0] = wm8955->deemph; 396 ucontrol->value.enumerated.item[0] = wm8955->deemph;
@@ -400,7 +400,7 @@ static int wm8955_get_deemph(struct snd_kcontrol *kcontrol,
400static int wm8955_put_deemph(struct snd_kcontrol *kcontrol, 400static int wm8955_put_deemph(struct snd_kcontrol *kcontrol,
401 struct snd_ctl_elem_value *ucontrol) 401 struct snd_ctl_elem_value *ucontrol)
402{ 402{
403 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 403 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
404 struct wm8955_priv *wm8955 = snd_soc_codec_get_drvdata(codec); 404 struct wm8955_priv *wm8955 = snd_soc_codec_get_drvdata(codec);
405 int deemph = ucontrol->value.enumerated.item[0]; 405 int deemph = ucontrol->value.enumerated.item[0];
406 406
diff --git a/sound/soc/codecs/wm8958-dsp2.c b/sound/soc/codecs/wm8958-dsp2.c
index 7ac2e511403c..b2ebb104d879 100644
--- a/sound/soc/codecs/wm8958-dsp2.c
+++ b/sound/soc/codecs/wm8958-dsp2.c
@@ -456,7 +456,7 @@ static int wm8958_dsp2_busy(struct wm8994_priv *wm8994, int aif)
456static int wm8958_put_mbc_enum(struct snd_kcontrol *kcontrol, 456static int wm8958_put_mbc_enum(struct snd_kcontrol *kcontrol,
457 struct snd_ctl_elem_value *ucontrol) 457 struct snd_ctl_elem_value *ucontrol)
458{ 458{
459 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 459 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
460 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); 460 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
461 struct wm8994 *control = wm8994->wm8994; 461 struct wm8994 *control = wm8994->wm8994;
462 int value = ucontrol->value.integer.value[0]; 462 int value = ucontrol->value.integer.value[0];
@@ -478,7 +478,7 @@ static int wm8958_put_mbc_enum(struct snd_kcontrol *kcontrol,
478static int wm8958_get_mbc_enum(struct snd_kcontrol *kcontrol, 478static int wm8958_get_mbc_enum(struct snd_kcontrol *kcontrol,
479 struct snd_ctl_elem_value *ucontrol) 479 struct snd_ctl_elem_value *ucontrol)
480{ 480{
481 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 481 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
482 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); 482 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
483 483
484 ucontrol->value.enumerated.item[0] = wm8994->mbc_cfg; 484 ucontrol->value.enumerated.item[0] = wm8994->mbc_cfg;
@@ -500,7 +500,7 @@ static int wm8958_mbc_get(struct snd_kcontrol *kcontrol,
500 struct snd_ctl_elem_value *ucontrol) 500 struct snd_ctl_elem_value *ucontrol)
501{ 501{
502 int mbc = kcontrol->private_value; 502 int mbc = kcontrol->private_value;
503 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 503 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
504 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); 504 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
505 505
506 ucontrol->value.integer.value[0] = wm8994->mbc_ena[mbc]; 506 ucontrol->value.integer.value[0] = wm8994->mbc_ena[mbc];
@@ -512,7 +512,7 @@ static int wm8958_mbc_put(struct snd_kcontrol *kcontrol,
512 struct snd_ctl_elem_value *ucontrol) 512 struct snd_ctl_elem_value *ucontrol)
513{ 513{
514 int mbc = kcontrol->private_value; 514 int mbc = kcontrol->private_value;
515 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 515 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
516 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); 516 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
517 517
518 if (wm8994->mbc_ena[mbc] == ucontrol->value.integer.value[0]) 518 if (wm8994->mbc_ena[mbc] == ucontrol->value.integer.value[0])
@@ -546,7 +546,7 @@ static int wm8958_mbc_put(struct snd_kcontrol *kcontrol,
546static int wm8958_put_vss_enum(struct snd_kcontrol *kcontrol, 546static int wm8958_put_vss_enum(struct snd_kcontrol *kcontrol,
547 struct snd_ctl_elem_value *ucontrol) 547 struct snd_ctl_elem_value *ucontrol)
548{ 548{
549 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 549 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
550 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); 550 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
551 struct wm8994 *control = wm8994->wm8994; 551 struct wm8994 *control = wm8994->wm8994;
552 int value = ucontrol->value.integer.value[0]; 552 int value = ucontrol->value.integer.value[0];
@@ -568,7 +568,7 @@ static int wm8958_put_vss_enum(struct snd_kcontrol *kcontrol,
568static int wm8958_get_vss_enum(struct snd_kcontrol *kcontrol, 568static int wm8958_get_vss_enum(struct snd_kcontrol *kcontrol,
569 struct snd_ctl_elem_value *ucontrol) 569 struct snd_ctl_elem_value *ucontrol)
570{ 570{
571 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 571 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
572 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); 572 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
573 573
574 ucontrol->value.enumerated.item[0] = wm8994->vss_cfg; 574 ucontrol->value.enumerated.item[0] = wm8994->vss_cfg;
@@ -579,7 +579,7 @@ static int wm8958_get_vss_enum(struct snd_kcontrol *kcontrol,
579static int wm8958_put_vss_hpf_enum(struct snd_kcontrol *kcontrol, 579static int wm8958_put_vss_hpf_enum(struct snd_kcontrol *kcontrol,
580 struct snd_ctl_elem_value *ucontrol) 580 struct snd_ctl_elem_value *ucontrol)
581{ 581{
582 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 582 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
583 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); 583 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
584 struct wm8994 *control = wm8994->wm8994; 584 struct wm8994 *control = wm8994->wm8994;
585 int value = ucontrol->value.integer.value[0]; 585 int value = ucontrol->value.integer.value[0];
@@ -601,7 +601,7 @@ static int wm8958_put_vss_hpf_enum(struct snd_kcontrol *kcontrol,
601static int wm8958_get_vss_hpf_enum(struct snd_kcontrol *kcontrol, 601static int wm8958_get_vss_hpf_enum(struct snd_kcontrol *kcontrol,
602 struct snd_ctl_elem_value *ucontrol) 602 struct snd_ctl_elem_value *ucontrol)
603{ 603{
604 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 604 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
605 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); 605 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
606 606
607 ucontrol->value.enumerated.item[0] = wm8994->vss_hpf_cfg; 607 ucontrol->value.enumerated.item[0] = wm8994->vss_hpf_cfg;
@@ -623,7 +623,7 @@ static int wm8958_vss_get(struct snd_kcontrol *kcontrol,
623 struct snd_ctl_elem_value *ucontrol) 623 struct snd_ctl_elem_value *ucontrol)
624{ 624{
625 int vss = kcontrol->private_value; 625 int vss = kcontrol->private_value;
626 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 626 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
627 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); 627 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
628 628
629 ucontrol->value.integer.value[0] = wm8994->vss_ena[vss]; 629 ucontrol->value.integer.value[0] = wm8994->vss_ena[vss];
@@ -635,7 +635,7 @@ static int wm8958_vss_put(struct snd_kcontrol *kcontrol,
635 struct snd_ctl_elem_value *ucontrol) 635 struct snd_ctl_elem_value *ucontrol)
636{ 636{
637 int vss = kcontrol->private_value; 637 int vss = kcontrol->private_value;
638 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 638 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
639 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); 639 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
640 640
641 if (wm8994->vss_ena[vss] == ucontrol->value.integer.value[0]) 641 if (wm8994->vss_ena[vss] == ucontrol->value.integer.value[0])
@@ -684,7 +684,7 @@ static int wm8958_hpf_get(struct snd_kcontrol *kcontrol,
684 struct snd_ctl_elem_value *ucontrol) 684 struct snd_ctl_elem_value *ucontrol)
685{ 685{
686 int hpf = kcontrol->private_value; 686 int hpf = kcontrol->private_value;
687 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 687 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
688 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); 688 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
689 689
690 if (hpf < 3) 690 if (hpf < 3)
@@ -699,7 +699,7 @@ static int wm8958_hpf_put(struct snd_kcontrol *kcontrol,
699 struct snd_ctl_elem_value *ucontrol) 699 struct snd_ctl_elem_value *ucontrol)
700{ 700{
701 int hpf = kcontrol->private_value; 701 int hpf = kcontrol->private_value;
702 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 702 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
703 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); 703 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
704 704
705 if (hpf < 3) { 705 if (hpf < 3) {
@@ -746,7 +746,7 @@ static int wm8958_hpf_put(struct snd_kcontrol *kcontrol,
746static int wm8958_put_enh_eq_enum(struct snd_kcontrol *kcontrol, 746static int wm8958_put_enh_eq_enum(struct snd_kcontrol *kcontrol,
747 struct snd_ctl_elem_value *ucontrol) 747 struct snd_ctl_elem_value *ucontrol)
748{ 748{
749 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 749 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
750 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); 750 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
751 struct wm8994 *control = wm8994->wm8994; 751 struct wm8994 *control = wm8994->wm8994;
752 int value = ucontrol->value.integer.value[0]; 752 int value = ucontrol->value.integer.value[0];
@@ -768,7 +768,7 @@ static int wm8958_put_enh_eq_enum(struct snd_kcontrol *kcontrol,
768static int wm8958_get_enh_eq_enum(struct snd_kcontrol *kcontrol, 768static int wm8958_get_enh_eq_enum(struct snd_kcontrol *kcontrol,
769 struct snd_ctl_elem_value *ucontrol) 769 struct snd_ctl_elem_value *ucontrol)
770{ 770{
771 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 771 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
772 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); 772 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
773 773
774 ucontrol->value.enumerated.item[0] = wm8994->enh_eq_cfg; 774 ucontrol->value.enumerated.item[0] = wm8994->enh_eq_cfg;
@@ -790,7 +790,7 @@ static int wm8958_enh_eq_get(struct snd_kcontrol *kcontrol,
790 struct snd_ctl_elem_value *ucontrol) 790 struct snd_ctl_elem_value *ucontrol)
791{ 791{
792 int eq = kcontrol->private_value; 792 int eq = kcontrol->private_value;
793 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 793 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
794 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); 794 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
795 795
796 ucontrol->value.integer.value[0] = wm8994->enh_eq_ena[eq]; 796 ucontrol->value.integer.value[0] = wm8994->enh_eq_ena[eq];
@@ -802,7 +802,7 @@ static int wm8958_enh_eq_put(struct snd_kcontrol *kcontrol,
802 struct snd_ctl_elem_value *ucontrol) 802 struct snd_ctl_elem_value *ucontrol)
803{ 803{
804 int eq = kcontrol->private_value; 804 int eq = kcontrol->private_value;
805 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 805 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
806 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); 806 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
807 807
808 if (wm8994->enh_eq_ena[eq] == ucontrol->value.integer.value[0]) 808 if (wm8994->enh_eq_ena[eq] == ucontrol->value.integer.value[0])
diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c
index d04e9cad445c..a145d0431b63 100644
--- a/sound/soc/codecs/wm8960.c
+++ b/sound/soc/codecs/wm8960.c
@@ -178,7 +178,7 @@ static int wm8960_set_deemph(struct snd_soc_codec *codec)
178static int wm8960_get_deemph(struct snd_kcontrol *kcontrol, 178static int wm8960_get_deemph(struct snd_kcontrol *kcontrol,
179 struct snd_ctl_elem_value *ucontrol) 179 struct snd_ctl_elem_value *ucontrol)
180{ 180{
181 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 181 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
182 struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec); 182 struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec);
183 183
184 ucontrol->value.enumerated.item[0] = wm8960->deemph; 184 ucontrol->value.enumerated.item[0] = wm8960->deemph;
@@ -188,7 +188,7 @@ static int wm8960_get_deemph(struct snd_kcontrol *kcontrol,
188static int wm8960_put_deemph(struct snd_kcontrol *kcontrol, 188static int wm8960_put_deemph(struct snd_kcontrol *kcontrol,
189 struct snd_ctl_elem_value *ucontrol) 189 struct snd_ctl_elem_value *ucontrol)
190{ 190{
191 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 191 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
192 struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec); 192 struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec);
193 int deemph = ucontrol->value.enumerated.item[0]; 193 int deemph = ucontrol->value.enumerated.item[0];
194 194
diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
index 5522d2566c67..37986c84cbff 100644
--- a/sound/soc/codecs/wm8962.c
+++ b/sound/soc/codecs/wm8962.c
@@ -1552,7 +1552,7 @@ static int wm8962_dsp2_ena_get(struct snd_kcontrol *kcontrol,
1552 struct snd_ctl_elem_value *ucontrol) 1552 struct snd_ctl_elem_value *ucontrol)
1553{ 1553{
1554 int shift = kcontrol->private_value; 1554 int shift = kcontrol->private_value;
1555 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 1555 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
1556 struct wm8962_priv *wm8962 = snd_soc_codec_get_drvdata(codec); 1556 struct wm8962_priv *wm8962 = snd_soc_codec_get_drvdata(codec);
1557 1557
1558 ucontrol->value.integer.value[0] = !!(wm8962->dsp2_ena & 1 << shift); 1558 ucontrol->value.integer.value[0] = !!(wm8962->dsp2_ena & 1 << shift);
@@ -1564,7 +1564,7 @@ static int wm8962_dsp2_ena_put(struct snd_kcontrol *kcontrol,
1564 struct snd_ctl_elem_value *ucontrol) 1564 struct snd_ctl_elem_value *ucontrol)
1565{ 1565{
1566 int shift = kcontrol->private_value; 1566 int shift = kcontrol->private_value;
1567 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 1567 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
1568 struct wm8962_priv *wm8962 = snd_soc_codec_get_drvdata(codec); 1568 struct wm8962_priv *wm8962 = snd_soc_codec_get_drvdata(codec);
1569 int old = wm8962->dsp2_ena; 1569 int old = wm8962->dsp2_ena;
1570 int ret = 0; 1570 int ret = 0;
@@ -1602,7 +1602,7 @@ out:
1602static int wm8962_put_hp_sw(struct snd_kcontrol *kcontrol, 1602static int wm8962_put_hp_sw(struct snd_kcontrol *kcontrol,
1603 struct snd_ctl_elem_value *ucontrol) 1603 struct snd_ctl_elem_value *ucontrol)
1604{ 1604{
1605 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 1605 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
1606 int ret; 1606 int ret;
1607 1607
1608 /* Apply the update (if any) */ 1608 /* Apply the update (if any) */
@@ -1632,7 +1632,7 @@ static int wm8962_put_hp_sw(struct snd_kcontrol *kcontrol,
1632static int wm8962_put_spk_sw(struct snd_kcontrol *kcontrol, 1632static int wm8962_put_spk_sw(struct snd_kcontrol *kcontrol,
1633 struct snd_ctl_elem_value *ucontrol) 1633 struct snd_ctl_elem_value *ucontrol)
1634{ 1634{
1635 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 1635 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
1636 int ret; 1636 int ret;
1637 1637
1638 /* Apply the update (if any) */ 1638 /* Apply the update (if any) */
diff --git a/sound/soc/codecs/wm8983.c b/sound/soc/codecs/wm8983.c
index 2b9bfa53efbf..19d5baa38f5c 100644
--- a/sound/soc/codecs/wm8983.c
+++ b/sound/soc/codecs/wm8983.c
@@ -552,7 +552,7 @@ static const struct snd_soc_dapm_route wm8983_audio_map[] = {
552static int eqmode_get(struct snd_kcontrol *kcontrol, 552static int eqmode_get(struct snd_kcontrol *kcontrol,
553 struct snd_ctl_elem_value *ucontrol) 553 struct snd_ctl_elem_value *ucontrol)
554{ 554{
555 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 555 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
556 unsigned int reg; 556 unsigned int reg;
557 557
558 reg = snd_soc_read(codec, WM8983_EQ1_LOW_SHELF); 558 reg = snd_soc_read(codec, WM8983_EQ1_LOW_SHELF);
@@ -567,7 +567,7 @@ static int eqmode_get(struct snd_kcontrol *kcontrol,
567static int eqmode_put(struct snd_kcontrol *kcontrol, 567static int eqmode_put(struct snd_kcontrol *kcontrol,
568 struct snd_ctl_elem_value *ucontrol) 568 struct snd_ctl_elem_value *ucontrol)
569{ 569{
570 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 570 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
571 unsigned int regpwr2, regpwr3; 571 unsigned int regpwr2, regpwr3;
572 unsigned int reg_eq; 572 unsigned int reg_eq;
573 573
diff --git a/sound/soc/codecs/wm8985.c b/sound/soc/codecs/wm8985.c
index 5473dc969585..ad23ffb8346c 100644
--- a/sound/soc/codecs/wm8985.c
+++ b/sound/soc/codecs/wm8985.c
@@ -526,7 +526,7 @@ static const struct snd_soc_dapm_route wm8985_dapm_routes[] = {
526static int eqmode_get(struct snd_kcontrol *kcontrol, 526static int eqmode_get(struct snd_kcontrol *kcontrol,
527 struct snd_ctl_elem_value *ucontrol) 527 struct snd_ctl_elem_value *ucontrol)
528{ 528{
529 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 529 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
530 unsigned int reg; 530 unsigned int reg;
531 531
532 reg = snd_soc_read(codec, WM8985_EQ1_LOW_SHELF); 532 reg = snd_soc_read(codec, WM8985_EQ1_LOW_SHELF);
@@ -541,7 +541,7 @@ static int eqmode_get(struct snd_kcontrol *kcontrol,
541static int eqmode_put(struct snd_kcontrol *kcontrol, 541static int eqmode_put(struct snd_kcontrol *kcontrol,
542 struct snd_ctl_elem_value *ucontrol) 542 struct snd_ctl_elem_value *ucontrol)
543{ 543{
544 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 544 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
545 unsigned int regpwr2, regpwr3; 545 unsigned int regpwr2, regpwr3;
546 unsigned int reg_eq; 546 unsigned int reg_eq;
547 547
diff --git a/sound/soc/codecs/wm8990.c b/sound/soc/codecs/wm8990.c
index c413c1991453..b5c1f0f07058 100644
--- a/sound/soc/codecs/wm8990.c
+++ b/sound/soc/codecs/wm8990.c
@@ -132,7 +132,7 @@ static const DECLARE_TLV_DB_SCALE(out_sidetone_tlv, -3600, 0, 0);
132static int wm899x_outpga_put_volsw_vu(struct snd_kcontrol *kcontrol, 132static int wm899x_outpga_put_volsw_vu(struct snd_kcontrol *kcontrol,
133 struct snd_ctl_elem_value *ucontrol) 133 struct snd_ctl_elem_value *ucontrol)
134{ 134{
135 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 135 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
136 struct soc_mixer_control *mc = 136 struct soc_mixer_control *mc =
137 (struct soc_mixer_control *)kcontrol->private_value; 137 (struct soc_mixer_control *)kcontrol->private_value;
138 int reg = mc->reg; 138 int reg = mc->reg;
diff --git a/sound/soc/codecs/wm8991.c b/sound/soc/codecs/wm8991.c
index 844cc4a60d66..b8fd284fc0c0 100644
--- a/sound/soc/codecs/wm8991.c
+++ b/sound/soc/codecs/wm8991.c
@@ -154,7 +154,7 @@ static const unsigned int out_sidetone_tlv[] = {
154static int wm899x_outpga_put_volsw_vu(struct snd_kcontrol *kcontrol, 154static int wm899x_outpga_put_volsw_vu(struct snd_kcontrol *kcontrol,
155 struct snd_ctl_elem_value *ucontrol) 155 struct snd_ctl_elem_value *ucontrol)
156{ 156{
157 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 157 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
158 int reg = kcontrol->private_value & 0xff; 158 int reg = kcontrol->private_value & 0xff;
159 int ret; 159 int ret;
160 u16 val; 160 u16 val;
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
index 6303537f54c6..3eb390be7dee 100644
--- a/sound/soc/codecs/wm8994.c
+++ b/sound/soc/codecs/wm8994.c
@@ -298,7 +298,7 @@ static int wm8994_put_drc_sw(struct snd_kcontrol *kcontrol,
298{ 298{
299 struct soc_mixer_control *mc = 299 struct soc_mixer_control *mc =
300 (struct soc_mixer_control *)kcontrol->private_value; 300 (struct soc_mixer_control *)kcontrol->private_value;
301 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 301 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
302 int mask, ret; 302 int mask, ret;
303 303
304 /* Can't enable both ADC and DAC paths simultaneously */ 304 /* Can't enable both ADC and DAC paths simultaneously */
@@ -355,7 +355,7 @@ static int wm8994_get_drc(const char *name)
355static int wm8994_put_drc_enum(struct snd_kcontrol *kcontrol, 355static int wm8994_put_drc_enum(struct snd_kcontrol *kcontrol,
356 struct snd_ctl_elem_value *ucontrol) 356 struct snd_ctl_elem_value *ucontrol)
357{ 357{
358 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 358 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
359 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); 359 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
360 struct wm8994 *control = wm8994->wm8994; 360 struct wm8994 *control = wm8994->wm8994;
361 struct wm8994_pdata *pdata = &control->pdata; 361 struct wm8994_pdata *pdata = &control->pdata;
@@ -378,7 +378,7 @@ static int wm8994_put_drc_enum(struct snd_kcontrol *kcontrol,
378static int wm8994_get_drc_enum(struct snd_kcontrol *kcontrol, 378static int wm8994_get_drc_enum(struct snd_kcontrol *kcontrol,
379 struct snd_ctl_elem_value *ucontrol) 379 struct snd_ctl_elem_value *ucontrol)
380{ 380{
381 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 381 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
382 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); 382 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
383 int drc = wm8994_get_drc(kcontrol->id.name); 383 int drc = wm8994_get_drc(kcontrol->id.name);
384 384
@@ -462,7 +462,7 @@ static int wm8994_get_retune_mobile_block(const char *name)
462static int wm8994_put_retune_mobile_enum(struct snd_kcontrol *kcontrol, 462static int wm8994_put_retune_mobile_enum(struct snd_kcontrol *kcontrol,
463 struct snd_ctl_elem_value *ucontrol) 463 struct snd_ctl_elem_value *ucontrol)
464{ 464{
465 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 465 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
466 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); 466 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
467 struct wm8994 *control = wm8994->wm8994; 467 struct wm8994 *control = wm8994->wm8994;
468 struct wm8994_pdata *pdata = &control->pdata; 468 struct wm8994_pdata *pdata = &control->pdata;
@@ -485,7 +485,7 @@ static int wm8994_put_retune_mobile_enum(struct snd_kcontrol *kcontrol,
485static int wm8994_get_retune_mobile_enum(struct snd_kcontrol *kcontrol, 485static int wm8994_get_retune_mobile_enum(struct snd_kcontrol *kcontrol,
486 struct snd_ctl_elem_value *ucontrol) 486 struct snd_ctl_elem_value *ucontrol)
487{ 487{
488 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 488 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
489 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); 489 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
490 int block = wm8994_get_retune_mobile_block(kcontrol->id.name); 490 int block = wm8994_get_retune_mobile_block(kcontrol->id.name);
491 491
diff --git a/sound/soc/codecs/wm8996.c b/sound/soc/codecs/wm8996.c
index c6cbb3b8ace9..69266332760e 100644
--- a/sound/soc/codecs/wm8996.c
+++ b/sound/soc/codecs/wm8996.c
@@ -412,7 +412,7 @@ static int wm8996_get_retune_mobile_block(const char *name)
412static int wm8996_put_retune_mobile_enum(struct snd_kcontrol *kcontrol, 412static int wm8996_put_retune_mobile_enum(struct snd_kcontrol *kcontrol,
413 struct snd_ctl_elem_value *ucontrol) 413 struct snd_ctl_elem_value *ucontrol)
414{ 414{
415 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 415 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
416 struct wm8996_priv *wm8996 = snd_soc_codec_get_drvdata(codec); 416 struct wm8996_priv *wm8996 = snd_soc_codec_get_drvdata(codec);
417 struct wm8996_pdata *pdata = &wm8996->pdata; 417 struct wm8996_pdata *pdata = &wm8996->pdata;
418 int block = wm8996_get_retune_mobile_block(kcontrol->id.name); 418 int block = wm8996_get_retune_mobile_block(kcontrol->id.name);
@@ -434,7 +434,7 @@ static int wm8996_put_retune_mobile_enum(struct snd_kcontrol *kcontrol,
434static int wm8996_get_retune_mobile_enum(struct snd_kcontrol *kcontrol, 434static int wm8996_get_retune_mobile_enum(struct snd_kcontrol *kcontrol,
435 struct snd_ctl_elem_value *ucontrol) 435 struct snd_ctl_elem_value *ucontrol)
436{ 436{
437 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 437 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
438 struct wm8996_priv *wm8996 = snd_soc_codec_get_drvdata(codec); 438 struct wm8996_priv *wm8996 = snd_soc_codec_get_drvdata(codec);
439 int block = wm8996_get_retune_mobile_block(kcontrol->id.name); 439 int block = wm8996_get_retune_mobile_block(kcontrol->id.name);
440 440
diff --git a/sound/soc/codecs/wm9081.c b/sound/soc/codecs/wm9081.c
index d18eff31fbbc..185eb97769e7 100644
--- a/sound/soc/codecs/wm9081.c
+++ b/sound/soc/codecs/wm9081.c
@@ -340,7 +340,7 @@ static SOC_ENUM_SINGLE_DECL(speaker_mode, WM9081_ANALOGUE_SPEAKER_2, 6,
340static int speaker_mode_get(struct snd_kcontrol *kcontrol, 340static int speaker_mode_get(struct snd_kcontrol *kcontrol,
341 struct snd_ctl_elem_value *ucontrol) 341 struct snd_ctl_elem_value *ucontrol)
342{ 342{
343 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 343 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
344 unsigned int reg; 344 unsigned int reg;
345 345
346 reg = snd_soc_read(codec, WM9081_ANALOGUE_SPEAKER_2); 346 reg = snd_soc_read(codec, WM9081_ANALOGUE_SPEAKER_2);
@@ -361,7 +361,7 @@ static int speaker_mode_get(struct snd_kcontrol *kcontrol,
361static int speaker_mode_put(struct snd_kcontrol *kcontrol, 361static int speaker_mode_put(struct snd_kcontrol *kcontrol,
362 struct snd_ctl_elem_value *ucontrol) 362 struct snd_ctl_elem_value *ucontrol)
363{ 363{
364 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 364 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
365 unsigned int reg_pwr = snd_soc_read(codec, WM9081_POWER_MANAGEMENT); 365 unsigned int reg_pwr = snd_soc_read(codec, WM9081_POWER_MANAGEMENT);
366 unsigned int reg2 = snd_soc_read(codec, WM9081_ANALOGUE_SPEAKER_2); 366 unsigned int reg2 = snd_soc_read(codec, WM9081_ANALOGUE_SPEAKER_2);
367 367
diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
index bb5f7b4e3ebb..d9686dcd024c 100644
--- a/sound/soc/codecs/wm_adsp.c
+++ b/sound/soc/codecs/wm_adsp.c
@@ -242,7 +242,7 @@ struct wm_coeff_ctl {
242static int wm_adsp_fw_get(struct snd_kcontrol *kcontrol, 242static int wm_adsp_fw_get(struct snd_kcontrol *kcontrol,
243 struct snd_ctl_elem_value *ucontrol) 243 struct snd_ctl_elem_value *ucontrol)
244{ 244{
245 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 245 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
246 struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; 246 struct soc_enum *e = (struct soc_enum *)kcontrol->private_value;
247 struct wm_adsp *adsp = snd_soc_codec_get_drvdata(codec); 247 struct wm_adsp *adsp = snd_soc_codec_get_drvdata(codec);
248 248
@@ -254,7 +254,7 @@ static int wm_adsp_fw_get(struct snd_kcontrol *kcontrol,
254static int wm_adsp_fw_put(struct snd_kcontrol *kcontrol, 254static int wm_adsp_fw_put(struct snd_kcontrol *kcontrol,
255 struct snd_ctl_elem_value *ucontrol) 255 struct snd_ctl_elem_value *ucontrol)
256{ 256{
257 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 257 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
258 struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; 258 struct soc_enum *e = (struct soc_enum *)kcontrol->private_value;
259 struct wm_adsp *adsp = snd_soc_codec_get_drvdata(codec); 259 struct wm_adsp *adsp = snd_soc_codec_get_drvdata(codec);
260 260
diff --git a/sound/soc/codecs/wm_hubs.c b/sound/soc/codecs/wm_hubs.c
index b6209662ab13..916817fe6632 100644
--- a/sound/soc/codecs/wm_hubs.c
+++ b/sound/soc/codecs/wm_hubs.c
@@ -337,7 +337,7 @@ static void enable_dc_servo(struct snd_soc_codec *codec)
337static int wm8993_put_dc_servo(struct snd_kcontrol *kcontrol, 337static int wm8993_put_dc_servo(struct snd_kcontrol *kcontrol,
338 struct snd_ctl_elem_value *ucontrol) 338 struct snd_ctl_elem_value *ucontrol)
339{ 339{
340 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); 340 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
341 struct wm_hubs_data *hubs = snd_soc_codec_get_drvdata(codec); 341 struct wm_hubs_data *hubs = snd_soc_codec_get_drvdata(codec);
342 int ret; 342 int ret;
343 343