diff options
Diffstat (limited to 'sound/soc/codecs/wm8523.c')
-rw-r--r-- | sound/soc/codecs/wm8523.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sound/soc/codecs/wm8523.c b/sound/soc/codecs/wm8523.c index 712ef7c76f90..d3318886f43e 100644 --- a/sound/soc/codecs/wm8523.c +++ b/sound/soc/codecs/wm8523.c | |||
@@ -110,10 +110,11 @@ static const struct snd_soc_dapm_route intercon[] = { | |||
110 | 110 | ||
111 | static int wm8523_add_widgets(struct snd_soc_codec *codec) | 111 | static int wm8523_add_widgets(struct snd_soc_codec *codec) |
112 | { | 112 | { |
113 | snd_soc_dapm_new_controls(codec, wm8523_dapm_widgets, | 113 | struct snd_soc_dapm_context *dapm = &codec->dapm; |
114 | ARRAY_SIZE(wm8523_dapm_widgets)); | ||
115 | 114 | ||
116 | snd_soc_dapm_add_routes(codec, intercon, ARRAY_SIZE(intercon)); | 115 | snd_soc_dapm_new_controls(dapm, wm8523_dapm_widgets, |
116 | ARRAY_SIZE(wm8523_dapm_widgets)); | ||
117 | snd_soc_dapm_add_routes(dapm, intercon, ARRAY_SIZE(intercon)); | ||
117 | 118 | ||
118 | return 0; | 119 | return 0; |
119 | } | 120 | } |
@@ -328,7 +329,7 @@ static int wm8523_set_bias_level(struct snd_soc_codec *codec, | |||
328 | break; | 329 | break; |
329 | 330 | ||
330 | case SND_SOC_BIAS_STANDBY: | 331 | case SND_SOC_BIAS_STANDBY: |
331 | if (codec->bias_level == SND_SOC_BIAS_OFF) { | 332 | if (codec->dapm.bias_level == SND_SOC_BIAS_OFF) { |
332 | ret = regulator_bulk_enable(ARRAY_SIZE(wm8523->supplies), | 333 | ret = regulator_bulk_enable(ARRAY_SIZE(wm8523->supplies), |
333 | wm8523->supplies); | 334 | wm8523->supplies); |
334 | if (ret != 0) { | 335 | if (ret != 0) { |
@@ -367,7 +368,7 @@ static int wm8523_set_bias_level(struct snd_soc_codec *codec, | |||
367 | wm8523->supplies); | 368 | wm8523->supplies); |
368 | break; | 369 | break; |
369 | } | 370 | } |
370 | codec->bias_level = level; | 371 | codec->dapm.bias_level = level; |
371 | return 0; | 372 | return 0; |
372 | } | 373 | } |
373 | 374 | ||