Message ID | 1472483218-11987-1-git-send-email-jjassal@opensource.wolfsonmicro.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Mon, Aug 29, 2016 at 04:06:58PM +0100, Jaswinder Jassal wrote: > Incorrect shift value was being used to extract the second item. > > Signed-off-by: Jaswinder Jassal <jjassal@opensource.wolfsonmicro.com> > --- Reviewed-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Thanks, Charles
diff --git a/sound/soc/soc-ops.c b/sound/soc/soc-ops.c index a513a34..9fc1a7b 100644 --- a/sound/soc/soc-ops.c +++ b/sound/soc/soc-ops.c @@ -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; }
Incorrect shift value was being used to extract the second item. Signed-off-by: Jaswinder Jassal <jjassal@opensource.wolfsonmicro.com> --- sound/soc/soc-ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)