diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2015-01-13 04:27:13 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-01-14 14:53:00 -0500 |
commit | a8c696f13ba79a6e60517d43110038a24862e286 (patch) | |
tree | efd0cd582a268435371e94cd4f9d2541ef233cf3 | |
parent | 83f132c5e3c18db61965fe49c827bd7ec04e78c0 (diff) |
ASoC: wm8400: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/codecs/wm8400.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sound/soc/codecs/wm8400.c b/sound/soc/codecs/wm8400.c index 8ee446987aa9..b0d84e552fca 100644 --- a/sound/soc/codecs/wm8400.c +++ b/sound/soc/codecs/wm8400.c | |||
@@ -324,6 +324,7 @@ SOC_SINGLE("RIN34 Mute Switch", WM8400_RIGHT_LINE_INPUT_3_4_VOLUME, | |||
324 | static int outmixer_event (struct snd_soc_dapm_widget *w, | 324 | static int outmixer_event (struct snd_soc_dapm_widget *w, |
325 | struct snd_kcontrol * kcontrol, int event) | 325 | struct snd_kcontrol * kcontrol, int event) |
326 | { | 326 | { |
327 | struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); | ||
327 | struct soc_mixer_control *mc = | 328 | struct soc_mixer_control *mc = |
328 | (struct soc_mixer_control *)kcontrol->private_value; | 329 | (struct soc_mixer_control *)kcontrol->private_value; |
329 | u32 reg_shift = mc->shift; | 330 | u32 reg_shift = mc->shift; |
@@ -332,7 +333,7 @@ static int outmixer_event (struct snd_soc_dapm_widget *w, | |||
332 | 333 | ||
333 | switch (reg_shift) { | 334 | switch (reg_shift) { |
334 | case WM8400_SPEAKER_MIXER | (WM8400_LDSPK << 8) : | 335 | case WM8400_SPEAKER_MIXER | (WM8400_LDSPK << 8) : |
335 | reg = snd_soc_read(w->codec, WM8400_OUTPUT_MIXER1); | 336 | reg = snd_soc_read(codec, WM8400_OUTPUT_MIXER1); |
336 | if (reg & WM8400_LDLO) { | 337 | if (reg & WM8400_LDLO) { |
337 | printk(KERN_WARNING | 338 | printk(KERN_WARNING |
338 | "Cannot set as Output Mixer 1 LDLO Set\n"); | 339 | "Cannot set as Output Mixer 1 LDLO Set\n"); |
@@ -340,7 +341,7 @@ static int outmixer_event (struct snd_soc_dapm_widget *w, | |||
340 | } | 341 | } |
341 | break; | 342 | break; |
342 | case WM8400_SPEAKER_MIXER | (WM8400_RDSPK << 8): | 343 | case WM8400_SPEAKER_MIXER | (WM8400_RDSPK << 8): |
343 | reg = snd_soc_read(w->codec, WM8400_OUTPUT_MIXER2); | 344 | reg = snd_soc_read(codec, WM8400_OUTPUT_MIXER2); |
344 | if (reg & WM8400_RDRO) { | 345 | if (reg & WM8400_RDRO) { |
345 | printk(KERN_WARNING | 346 | printk(KERN_WARNING |
346 | "Cannot set as Output Mixer 2 RDRO Set\n"); | 347 | "Cannot set as Output Mixer 2 RDRO Set\n"); |
@@ -348,7 +349,7 @@ static int outmixer_event (struct snd_soc_dapm_widget *w, | |||
348 | } | 349 | } |
349 | break; | 350 | break; |
350 | case WM8400_OUTPUT_MIXER1 | (WM8400_LDLO << 8): | 351 | case WM8400_OUTPUT_MIXER1 | (WM8400_LDLO << 8): |
351 | reg = snd_soc_read(w->codec, WM8400_SPEAKER_MIXER); | 352 | reg = snd_soc_read(codec, WM8400_SPEAKER_MIXER); |
352 | if (reg & WM8400_LDSPK) { | 353 | if (reg & WM8400_LDSPK) { |
353 | printk(KERN_WARNING | 354 | printk(KERN_WARNING |
354 | "Cannot set as Speaker Mixer LDSPK Set\n"); | 355 | "Cannot set as Speaker Mixer LDSPK Set\n"); |
@@ -356,7 +357,7 @@ static int outmixer_event (struct snd_soc_dapm_widget *w, | |||
356 | } | 357 | } |
357 | break; | 358 | break; |
358 | case WM8400_OUTPUT_MIXER2 | (WM8400_RDRO << 8): | 359 | case WM8400_OUTPUT_MIXER2 | (WM8400_RDRO << 8): |
359 | reg = snd_soc_read(w->codec, WM8400_SPEAKER_MIXER); | 360 | reg = snd_soc_read(codec, WM8400_SPEAKER_MIXER); |
360 | if (reg & WM8400_RDSPK) { | 361 | if (reg & WM8400_RDSPK) { |
361 | printk(KERN_WARNING | 362 | printk(KERN_WARNING |
362 | "Cannot set as Speaker Mixer RDSPK Set\n"); | 363 | "Cannot set as Speaker Mixer RDSPK Set\n"); |