diff options
Diffstat (limited to 'sound/soc/codecs/wm8974.c')
-rw-r--r-- | sound/soc/codecs/wm8974.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sound/soc/codecs/wm8974.c b/sound/soc/codecs/wm8974.c index b4363f6d19b3..d19bb14842d4 100644 --- a/sound/soc/codecs/wm8974.c +++ b/sound/soc/codecs/wm8974.c | |||
@@ -274,10 +274,11 @@ static const struct snd_soc_dapm_route audio_map[] = { | |||
274 | 274 | ||
275 | static int wm8974_add_widgets(struct snd_soc_codec *codec) | 275 | static int wm8974_add_widgets(struct snd_soc_codec *codec) |
276 | { | 276 | { |
277 | snd_soc_dapm_new_controls(codec, wm8974_dapm_widgets, | 277 | struct snd_soc_dapm_context *dapm = &codec->dapm; |
278 | ARRAY_SIZE(wm8974_dapm_widgets)); | ||
279 | 278 | ||
280 | snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); | 279 | snd_soc_dapm_new_controls(dapm, wm8974_dapm_widgets, |
280 | ARRAY_SIZE(wm8974_dapm_widgets)); | ||
281 | snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map)); | ||
281 | 282 | ||
282 | return 0; | 283 | return 0; |
283 | } | 284 | } |
@@ -530,7 +531,7 @@ static int wm8974_set_bias_level(struct snd_soc_codec *codec, | |||
530 | case SND_SOC_BIAS_STANDBY: | 531 | case SND_SOC_BIAS_STANDBY: |
531 | power1 |= WM8974_POWER1_BIASEN | WM8974_POWER1_BUFIOEN; | 532 | power1 |= WM8974_POWER1_BIASEN | WM8974_POWER1_BUFIOEN; |
532 | 533 | ||
533 | if (codec->bias_level == SND_SOC_BIAS_OFF) { | 534 | if (codec->dapm.bias_level == SND_SOC_BIAS_OFF) { |
534 | /* Initial cap charge at VMID 5k */ | 535 | /* Initial cap charge at VMID 5k */ |
535 | snd_soc_write(codec, WM8974_POWER1, power1 | 0x3); | 536 | snd_soc_write(codec, WM8974_POWER1, power1 | 0x3); |
536 | mdelay(100); | 537 | mdelay(100); |
@@ -547,7 +548,7 @@ static int wm8974_set_bias_level(struct snd_soc_codec *codec, | |||
547 | break; | 548 | break; |
548 | } | 549 | } |
549 | 550 | ||
550 | codec->bias_level = level; | 551 | codec->dapm.bias_level = level; |
551 | return 0; | 552 | return 0; |
552 | } | 553 | } |
553 | 554 | ||