Commit 0cad1053 authored by Takashi Iwai's avatar Takashi Iwai Committed by Mark Brown

ASoC: wm8753: Fix enum ctl accesses in a wrong type

"DAI Mode" ctl in wm8753 codec driver is enum, while the current
driver accesses wrongly via value.integer.value[].  They have to be
via value.enumerated.item[] instead.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 92e963f5
...@@ -233,7 +233,7 @@ static int wm8753_get_dai(struct snd_kcontrol *kcontrol, ...@@ -233,7 +233,7 @@ static int wm8753_get_dai(struct snd_kcontrol *kcontrol,
struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
struct wm8753_priv *wm8753 = snd_soc_codec_get_drvdata(codec); struct wm8753_priv *wm8753 = snd_soc_codec_get_drvdata(codec);
ucontrol->value.integer.value[0] = wm8753->dai_func; ucontrol->value.enumerated.item[0] = wm8753->dai_func;
return 0; return 0;
} }
...@@ -244,7 +244,7 @@ static int wm8753_set_dai(struct snd_kcontrol *kcontrol, ...@@ -244,7 +244,7 @@ static int wm8753_set_dai(struct snd_kcontrol *kcontrol,
struct wm8753_priv *wm8753 = snd_soc_codec_get_drvdata(codec); struct wm8753_priv *wm8753 = snd_soc_codec_get_drvdata(codec);
u16 ioctl; u16 ioctl;
if (wm8753->dai_func == ucontrol->value.integer.value[0]) if (wm8753->dai_func == ucontrol->value.enumerated.item[0])
return 0; return 0;
if (snd_soc_codec_is_active(codec)) if (snd_soc_codec_is_active(codec))
...@@ -252,7 +252,7 @@ static int wm8753_set_dai(struct snd_kcontrol *kcontrol, ...@@ -252,7 +252,7 @@ static int wm8753_set_dai(struct snd_kcontrol *kcontrol,
ioctl = snd_soc_read(codec, WM8753_IOCTL); ioctl = snd_soc_read(codec, WM8753_IOCTL);
wm8753->dai_func = ucontrol->value.integer.value[0]; wm8753->dai_func = ucontrol->value.enumerated.item[0];
if (((ioctl >> 2) & 0x3) == wm8753->dai_func) if (((ioctl >> 2) & 0x3) == wm8753->dai_func)
return 1; return 1;
......
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