aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2016-02-29 12:01:10 -0500
committerMark Brown <broonie@kernel.org>2016-02-29 22:09:46 -0500
commit0cad10539b281e88335afd765afaf9885dcfc3ef (patch)
tree2fa1f61f95a6abdeeafe6725ea96c75d404b2a62
parent92e963f50fc74041b5e9e744c330dca48e04f08d (diff)
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: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/codecs/wm8753.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c
index 61299ca372ff..6f1024f48b19 100644
--- a/sound/soc/codecs/wm8753.c
+++ b/sound/soc/codecs/wm8753.c
@@ -233,7 +233,7 @@ static int wm8753_get_dai(struct snd_kcontrol *kcontrol,
233 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); 233 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
234 struct wm8753_priv *wm8753 = snd_soc_codec_get_drvdata(codec); 234 struct wm8753_priv *wm8753 = snd_soc_codec_get_drvdata(codec);
235 235
236 ucontrol->value.integer.value[0] = wm8753->dai_func; 236 ucontrol->value.enumerated.item[0] = wm8753->dai_func;
237 return 0; 237 return 0;
238} 238}
239 239
@@ -244,7 +244,7 @@ static int wm8753_set_dai(struct snd_kcontrol *kcontrol,
244 struct wm8753_priv *wm8753 = snd_soc_codec_get_drvdata(codec); 244 struct wm8753_priv *wm8753 = snd_soc_codec_get_drvdata(codec);
245 u16 ioctl; 245 u16 ioctl;
246 246
247 if (wm8753->dai_func == ucontrol->value.integer.value[0]) 247 if (wm8753->dai_func == ucontrol->value.enumerated.item[0])
248 return 0; 248 return 0;
249 249
250 if (snd_soc_codec_is_active(codec)) 250 if (snd_soc_codec_is_active(codec))
@@ -252,7 +252,7 @@ static int wm8753_set_dai(struct snd_kcontrol *kcontrol,
252 252
253 ioctl = snd_soc_read(codec, WM8753_IOCTL); 253 ioctl = snd_soc_read(codec, WM8753_IOCTL);
254 254
255 wm8753->dai_func = ucontrol->value.integer.value[0]; 255 wm8753->dai_func = ucontrol->value.enumerated.item[0];
256 256
257 if (((ioctl >> 2) & 0x3) == wm8753->dai_func) 257 if (((ioctl >> 2) & 0x3) == wm8753->dai_func)
258 return 1; 258 return 1;