aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8510.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/wm8510.c')
-rw-r--r--sound/soc/codecs/wm8510.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sound/soc/codecs/wm8510.c b/sound/soc/codecs/wm8510.c
index 8f107095760e..6b3833c7bdf3 100644
--- a/sound/soc/codecs/wm8510.c
+++ b/sound/soc/codecs/wm8510.c
@@ -216,10 +216,11 @@ static const struct snd_soc_dapm_route audio_map[] = {
216 216
217static int wm8510_add_widgets(struct snd_soc_codec *codec) 217static int wm8510_add_widgets(struct snd_soc_codec *codec)
218{ 218{
219 snd_soc_dapm_new_controls(codec, wm8510_dapm_widgets, 219 struct snd_soc_dapm_context *dapm = &codec->dapm;
220 ARRAY_SIZE(wm8510_dapm_widgets));
221 220
222 snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); 221 snd_soc_dapm_new_controls(dapm, wm8510_dapm_widgets,
222 ARRAY_SIZE(wm8510_dapm_widgets));
223 snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));
223 224
224 return 0; 225 return 0;
225} 226}
@@ -478,7 +479,7 @@ static int wm8510_set_bias_level(struct snd_soc_codec *codec,
478 case SND_SOC_BIAS_STANDBY: 479 case SND_SOC_BIAS_STANDBY:
479 power1 |= WM8510_POWER1_BIASEN | WM8510_POWER1_BUFIOEN; 480 power1 |= WM8510_POWER1_BIASEN | WM8510_POWER1_BUFIOEN;
480 481
481 if (codec->bias_level == SND_SOC_BIAS_OFF) { 482 if (codec->dapm.bias_level == SND_SOC_BIAS_OFF) {
482 /* Initial cap charge at VMID 5k */ 483 /* Initial cap charge at VMID 5k */
483 snd_soc_write(codec, WM8510_POWER1, power1 | 0x3); 484 snd_soc_write(codec, WM8510_POWER1, power1 | 0x3);
484 mdelay(100); 485 mdelay(100);
@@ -495,7 +496,7 @@ static int wm8510_set_bias_level(struct snd_soc_codec *codec,
495 break; 496 break;
496 } 497 }
497 498
498 codec->bias_level = level; 499 codec->dapm.bias_level = level;
499 return 0; 500 return 0;
500} 501}
501 502