diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-02-18 03:19:25 +0100 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-02-18 03:19:25 +0100 |
commit | 82a0a1cc8f94bc59e5919715bc03fc8353fa770d (patch) | |
tree | c25f19a0ae1f7cb75319b585c1d473cfed463f22 /sound/soc/codecs/tlv320aic3x.c | |
parent | powerpc/mm: Rework I$/D$ coherency (v3) (diff) | |
parent | Add support for VT6415 PCIE PATA IDE Host Controller (diff) | |
download | linux-82a0a1cc8f94bc59e5919715bc03fc8353fa770d.tar.xz linux-82a0a1cc8f94bc59e5919715bc03fc8353fa770d.zip |
Merge commit 'origin/master' into next
Manual merge of:
arch/powerpc/include/asm/pgtable-ppc32.h
Diffstat (limited to 'sound/soc/codecs/tlv320aic3x.c')
-rw-r--r-- | sound/soc/codecs/tlv320aic3x.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c index b47a749c5ea2..aea0cb72d80a 100644 --- a/sound/soc/codecs/tlv320aic3x.c +++ b/sound/soc/codecs/tlv320aic3x.c @@ -165,10 +165,13 @@ static int snd_soc_dapm_put_volsw_aic3x(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_dapm_widget *widget = snd_kcontrol_chip(kcontrol); - int reg = kcontrol->private_value & 0xff; - int shift = (kcontrol->private_value >> 8) & 0x0f; - int mask = (kcontrol->private_value >> 16) & 0xff; - int invert = (kcontrol->private_value >> 24) & 0x01; + struct soc_mixer_control *mc = + (struct soc_mixer_control *)kcontrol->private_value; + unsigned int reg = mc->reg; + unsigned int shift = mc->shift; + int max = mc->max; + unsigned int mask = (1 << fls(max)) - 1; + unsigned int invert = mc->invert; unsigned short val, val_mask; int ret; struct snd_soc_dapm_path *path; |