Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

The DRC Mode like "AIF1DRC1 Mode" and EQ Mode like "AIF1.1 EQ Mode" in
wm8994 codec driver are enum ctls, 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>
Cc: stable@vger.kernel.org

authored by

Takashi Iwai and committed by
Mark Brown
8019c0b3 92e963f5

+2 -2
+2 -2
sound/soc/codecs/wm8994.c
··· 362 362 struct wm8994 *control = wm8994->wm8994; 363 363 struct wm8994_pdata *pdata = &control->pdata; 364 364 int drc = wm8994_get_drc(kcontrol->id.name); 365 - int value = ucontrol->value.integer.value[0]; 365 + int value = ucontrol->value.enumerated.item[0]; 366 366 367 367 if (drc < 0) 368 368 return drc; ··· 469 469 struct wm8994 *control = wm8994->wm8994; 470 470 struct wm8994_pdata *pdata = &control->pdata; 471 471 int block = wm8994_get_retune_mobile_block(kcontrol->id.name); 472 - int value = ucontrol->value.integer.value[0]; 472 + int value = ucontrol->value.enumerated.item[0]; 473 473 474 474 if (block < 0) 475 475 return block;