aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2011-01-27 14:54:05 -0700
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-01-28 13:19:19 +0000
commite9cf7049330cd44c8af43b0c5c7bef25a086c5b7 (patch)
tree4ab14e007ccdf79efd7dba846566750f0583d6c2
parent0fa63b69284c9bbedf876c677a9e650243cc40be (diff)
downloadkernel_samsung_espresso10-e9cf7049330cd44c8af43b0c5c7bef25a086c5b7.zip
kernel_samsung_espresso10-e9cf7049330cd44c8af43b0c5c7bef25a086c5b7.tar.gz
kernel_samsung_espresso10-e9cf7049330cd44c8af43b0c5c7bef25a086c5b7.tar.bz2
ASoC: Fix mask/val_mask confusion snd_soc_dapm_put_volsw()
snd_soc_dapm_put_volsw() has variables for both the unshifted and shifted mask for updates commit 97404f (ASoC: Do DAPM control updates in the middle of DAPM sequences) got confused between the two of these. Since there's no need to keep a copy of the unshifted mask fix this and simplify the code by using only one mask variable. [Completely rewrote the changelog to describe the issue -- broonie.] Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r--sound/soc/soc-dapm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 499730a..8194f15 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -1742,7 +1742,7 @@ int snd_soc_dapm_put_volsw(struct snd_kcontrol *kcontrol,
int max = mc->max;
unsigned int mask = (1 << fls(max)) - 1;
unsigned int invert = mc->invert;
- unsigned int val, val_mask;
+ unsigned int val;
int connect, change;
struct snd_soc_dapm_update update;
@@ -1750,13 +1750,13 @@ int snd_soc_dapm_put_volsw(struct snd_kcontrol *kcontrol,
if (invert)
val = max - val;
- val_mask = mask << shift;
+ mask = mask << shift;
val = val << shift;
mutex_lock(&widget->codec->mutex);
widget->value = val;
- change = snd_soc_test_bits(widget->codec, reg, val_mask, val);
+ change = snd_soc_test_bits(widget->codec, reg, mask, val);
if (change) {
if (val)
/* new connection */