diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-06-12 20:03:04 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-06-12 20:03:04 +0200 |
commit | a6093a24bc7da25ce851d22ce3a7bcf1eaca4a95 (patch) | |
tree | 608cf7ec7ece949810d7a1bb680b8b52864d6608 /sound | |
parent | Merge branch 'topic/usb-audio' into for-linus (diff) | |
parent | ASoC: Fix lm4857 control (diff) | |
download | linux-a6093a24bc7da25ce851d22ce3a7bcf1eaca4a95.tar.xz linux-a6093a24bc7da25ce851d22ce3a7bcf1eaca4a95.zip |
Merge branch 'topic/asoc' into for-linus
* topic/asoc:
ASoC: Fix lm4857 control
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/s3c24xx/neo1973_wm8753.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/sound/soc/s3c24xx/neo1973_wm8753.c b/sound/soc/s3c24xx/neo1973_wm8753.c index 289fadf60b10..906709e6dd5f 100644 --- a/sound/soc/s3c24xx/neo1973_wm8753.c +++ b/sound/soc/s3c24xx/neo1973_wm8753.c @@ -345,9 +345,11 @@ static void lm4857_write_regs(void) static int lm4857_get_reg(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { - int reg = kcontrol->private_value & 0xFF; - int shift = (kcontrol->private_value >> 8) & 0x0F; - int mask = (kcontrol->private_value >> 16) & 0xFF; + struct soc_mixer_control *mc = + (struct soc_mixer_control *)kcontrol->private_value; + int reg = mc->reg; + int shift = mc->shift; + int mask = mc->max; pr_debug("Entered %s\n", __func__); @@ -358,9 +360,11 @@ static int lm4857_get_reg(struct snd_kcontrol *kcontrol, static int lm4857_set_reg(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { - int reg = kcontrol->private_value & 0xFF; - int shift = (kcontrol->private_value >> 8) & 0x0F; - int mask = (kcontrol->private_value >> 16) & 0xFF; + struct soc_mixer_control *mc = + (struct soc_mixer_control *)kcontrol->private_value; + int reg = mc->reg; + int shift = mc->shift; + int mask = mc->max; if (((lm4857_regs[reg] >> shift) & mask) == ucontrol->value.integer.value[0]) |