summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorJaswinder Jassal <jjassal@opensource.wolfsonmicro.com>2016-08-29 16:06:58 +0100
committerMark Brown <broonie@kernel.org>2016-09-01 20:58:05 +0100
commit189f06c031d431d4fb7a78952df4c83ac7822b79 (patch)
treec81cd7dcd3b469b3d791ed4c1ad3ba8f4efb8bc8 /sound
parent29b4817d4018df78086157ea3a55c1d9424a7cfc (diff)
downloadblackbird-obmc-linux-189f06c031d431d4fb7a78952df4c83ac7822b79.tar.gz
blackbird-obmc-linux-189f06c031d431d4fb7a78952df4c83ac7822b79.zip
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: Jaswinder Jassal <jjassal@opensource.wolfsonmicro.com> Reviewed-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/soc-ops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/soc-ops.c b/sound/soc/soc-ops.c
index a513a34a51d2..9fc1a7bb8b95 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;
}
OpenPOWER on IntegriCloud