aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8776.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/wm8776.c')
-rw-r--r--sound/soc/codecs/wm8776.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sound/soc/codecs/wm8776.c b/sound/soc/codecs/wm8776.c
index 0132a27140ae..e09ed65e0868 100644
--- a/sound/soc/codecs/wm8776.c
+++ b/sound/soc/codecs/wm8776.c
@@ -306,7 +306,7 @@ static int wm8776_set_bias_level(struct snd_soc_codec *codec,
306 case SND_SOC_BIAS_PREPARE: 306 case SND_SOC_BIAS_PREPARE:
307 break; 307 break;
308 case SND_SOC_BIAS_STANDBY: 308 case SND_SOC_BIAS_STANDBY:
309 if (codec->bias_level == SND_SOC_BIAS_OFF) { 309 if (codec->dapm.bias_level == SND_SOC_BIAS_OFF) {
310 /* Disable the global powerdown; DAPM does the rest */ 310 /* Disable the global powerdown; DAPM does the rest */
311 snd_soc_update_bits(codec, WM8776_PWRDOWN, 1, 0); 311 snd_soc_update_bits(codec, WM8776_PWRDOWN, 1, 0);
312 } 312 }
@@ -317,7 +317,7 @@ static int wm8776_set_bias_level(struct snd_soc_codec *codec,
317 break; 317 break;
318 } 318 }
319 319
320 codec->bias_level = level; 320 codec->dapm.bias_level = level;
321 return 0; 321 return 0;
322} 322}
323 323
@@ -404,6 +404,7 @@ static int wm8776_resume(struct snd_soc_codec *codec)
404static int wm8776_probe(struct snd_soc_codec *codec) 404static int wm8776_probe(struct snd_soc_codec *codec)
405{ 405{
406 struct wm8776_priv *wm8776 = snd_soc_codec_get_drvdata(codec); 406 struct wm8776_priv *wm8776 = snd_soc_codec_get_drvdata(codec);
407 struct snd_soc_dapm_context *dapm = &codec->dapm;
407 int ret = 0; 408 int ret = 0;
408 409
409 ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8776->control_type); 410 ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8776->control_type);
@@ -427,9 +428,9 @@ static int wm8776_probe(struct snd_soc_codec *codec)
427 428
428 snd_soc_add_controls(codec, wm8776_snd_controls, 429 snd_soc_add_controls(codec, wm8776_snd_controls,
429 ARRAY_SIZE(wm8776_snd_controls)); 430 ARRAY_SIZE(wm8776_snd_controls));
430 snd_soc_dapm_new_controls(codec, wm8776_dapm_widgets, 431 snd_soc_dapm_new_controls(dapm, wm8776_dapm_widgets,
431 ARRAY_SIZE(wm8776_dapm_widgets)); 432 ARRAY_SIZE(wm8776_dapm_widgets));
432 snd_soc_dapm_add_routes(codec, routes, ARRAY_SIZE(routes)); 433 snd_soc_dapm_add_routes(dapm, routes, ARRAY_SIZE(routes));
433 434
434 return ret; 435 return ret;
435} 436}