提交 189f06c0 编写于 作者: J Jaswinder Jassal 提交者: Mark Brown

ASoC: core: fix shift used for second item in snd_soc_get_enum_double

Incorrect shift value was being used to extract the second item.
Signed-off-by: NJaswinder Jassal <jjassal@opensource.wolfsonmicro.com>
Reviewed-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 29b4817d
......@@ -77,7 +77,7 @@ int snd_soc_get_enum_double(struct snd_kcontrol *kcontrol,
item = snd_soc_enum_val_to_item(e, val);
ucontrol->value.enumerated.item[0] = item;
if (e->shift_l != e->shift_r) {
val = (reg_val >> e->shift_l) & e->mask;
val = (reg_val >> e->shift_r) & e->mask;
item = snd_soc_enum_val_to_item(e, val);
ucontrol->value.enumerated.item[1] = item;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册