aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2016-02-29 12:01:11 -0500
committerMark Brown <broonie@kernel.org>2016-02-29 22:10:08 -0500
commitc41a024c4e770fff999f4164cc4d1696e5f17437 (patch)
tree151a42f5d793d0a88f0059d3b3d6985a703bc9d6
parent92e963f50fc74041b5e9e744c330dca48e04f08d (diff)
ASoC: wm8904: Fix enum ctl accesses in a wrong type
"DRC Mode" and "EQ Mode" ctls in wm8904 codec driver are 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/wm8904.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/codecs/wm8904.c b/sound/soc/codecs/wm8904.c
index 8172e499e6ed..edd7a7709194 100644
--- a/sound/soc/codecs/wm8904.c
+++ b/sound/soc/codecs/wm8904.c
@@ -396,7 +396,7 @@ static int wm8904_put_drc_enum(struct snd_kcontrol *kcontrol,
396 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); 396 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
397 struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec); 397 struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec);
398 struct wm8904_pdata *pdata = wm8904->pdata; 398 struct wm8904_pdata *pdata = wm8904->pdata;
399 int value = ucontrol->value.integer.value[0]; 399 int value = ucontrol->value.enumerated.item[0];
400 400
401 if (value >= pdata->num_drc_cfgs) 401 if (value >= pdata->num_drc_cfgs)
402 return -EINVAL; 402 return -EINVAL;
@@ -467,7 +467,7 @@ static int wm8904_put_retune_mobile_enum(struct snd_kcontrol *kcontrol,
467 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); 467 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
468 struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec); 468 struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec);
469 struct wm8904_pdata *pdata = wm8904->pdata; 469 struct wm8904_pdata *pdata = wm8904->pdata;
470 int value = ucontrol->value.integer.value[0]; 470 int value = ucontrol->value.enumerated.item[0];
471 471
472 if (value >= pdata->num_retune_mobile_cfgs) 472 if (value >= pdata->num_retune_mobile_cfgs)
473 return -EINVAL; 473 return -EINVAL;