Commit f3b4d68f authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Mark Brown

ASoC: wm8991: 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: default avatarLars-Peter Clausen <lars@metafoo.de>
Acked-by: default avatarCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 68ca2f68
...@@ -382,13 +382,14 @@ static const struct snd_kcontrol_new wm8991_snd_controls[] = { ...@@ -382,13 +382,14 @@ static const struct snd_kcontrol_new wm8991_snd_controls[] = {
static int outmixer_event(struct snd_soc_dapm_widget *w, static int outmixer_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event) struct snd_kcontrol *kcontrol, int event)
{ {
struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
u32 reg_shift = kcontrol->private_value & 0xfff; u32 reg_shift = kcontrol->private_value & 0xfff;
int ret = 0; int ret = 0;
u16 reg; u16 reg;
switch (reg_shift) { switch (reg_shift) {
case WM8991_SPEAKER_MIXER | (WM8991_LDSPK_BIT << 8): case WM8991_SPEAKER_MIXER | (WM8991_LDSPK_BIT << 8):
reg = snd_soc_read(w->codec, WM8991_OUTPUT_MIXER1); reg = snd_soc_read(codec, WM8991_OUTPUT_MIXER1);
if (reg & WM8991_LDLO) { if (reg & WM8991_LDLO) {
printk(KERN_WARNING printk(KERN_WARNING
"Cannot set as Output Mixer 1 LDLO Set\n"); "Cannot set as Output Mixer 1 LDLO Set\n");
...@@ -397,7 +398,7 @@ static int outmixer_event(struct snd_soc_dapm_widget *w, ...@@ -397,7 +398,7 @@ static int outmixer_event(struct snd_soc_dapm_widget *w,
break; break;
case WM8991_SPEAKER_MIXER | (WM8991_RDSPK_BIT << 8): case WM8991_SPEAKER_MIXER | (WM8991_RDSPK_BIT << 8):
reg = snd_soc_read(w->codec, WM8991_OUTPUT_MIXER2); reg = snd_soc_read(codec, WM8991_OUTPUT_MIXER2);
if (reg & WM8991_RDRO) { if (reg & WM8991_RDRO) {
printk(KERN_WARNING printk(KERN_WARNING
"Cannot set as Output Mixer 2 RDRO Set\n"); "Cannot set as Output Mixer 2 RDRO Set\n");
...@@ -406,7 +407,7 @@ static int outmixer_event(struct snd_soc_dapm_widget *w, ...@@ -406,7 +407,7 @@ static int outmixer_event(struct snd_soc_dapm_widget *w,
break; break;
case WM8991_OUTPUT_MIXER1 | (WM8991_LDLO_BIT << 8): case WM8991_OUTPUT_MIXER1 | (WM8991_LDLO_BIT << 8):
reg = snd_soc_read(w->codec, WM8991_SPEAKER_MIXER); reg = snd_soc_read(codec, WM8991_SPEAKER_MIXER);
if (reg & WM8991_LDSPK) { if (reg & WM8991_LDSPK) {
printk(KERN_WARNING printk(KERN_WARNING
"Cannot set as Speaker Mixer LDSPK Set\n"); "Cannot set as Speaker Mixer LDSPK Set\n");
...@@ -415,7 +416,7 @@ static int outmixer_event(struct snd_soc_dapm_widget *w, ...@@ -415,7 +416,7 @@ static int outmixer_event(struct snd_soc_dapm_widget *w,
break; break;
case WM8991_OUTPUT_MIXER2 | (WM8991_RDRO_BIT << 8): case WM8991_OUTPUT_MIXER2 | (WM8991_RDRO_BIT << 8):
reg = snd_soc_read(w->codec, WM8991_SPEAKER_MIXER); reg = snd_soc_read(codec, WM8991_SPEAKER_MIXER);
if (reg & WM8991_RDSPK) { if (reg & WM8991_RDSPK) {
printk(KERN_WARNING printk(KERN_WARNING
"Cannot set as Speaker Mixer RDSPK Set\n"); "Cannot set as Speaker Mixer RDSPK Set\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment