diff options
Diffstat (limited to 'sound/soc/codecs/twl4030.c')
-rw-r--r-- | sound/soc/codecs/twl4030.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c index 1eb13d586309..682e4ac88939 100644 --- a/sound/soc/codecs/twl4030.c +++ b/sound/soc/codecs/twl4030.c | |||
@@ -965,9 +965,6 @@ static int snd_soc_put_twl4030_opmode_enum_double(struct snd_kcontrol *kcontrol, | |||
965 | { | 965 | { |
966 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); | 966 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); |
967 | struct twl4030_priv *twl4030 = snd_soc_codec_get_drvdata(codec); | 967 | struct twl4030_priv *twl4030 = snd_soc_codec_get_drvdata(codec); |
968 | struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; | ||
969 | unsigned short val; | ||
970 | unsigned short mask; | ||
971 | 968 | ||
972 | if (twl4030->configured) { | 969 | if (twl4030->configured) { |
973 | dev_err(codec->dev, | 970 | dev_err(codec->dev, |
@@ -975,19 +972,7 @@ static int snd_soc_put_twl4030_opmode_enum_double(struct snd_kcontrol *kcontrol, | |||
975 | return -EBUSY; | 972 | return -EBUSY; |
976 | } | 973 | } |
977 | 974 | ||
978 | if (ucontrol->value.enumerated.item[0] >= e->items) | 975 | return snd_soc_put_enum_double(kcontrol, ucontrol); |
979 | return -EINVAL; | ||
980 | |||
981 | val = ucontrol->value.enumerated.item[0] << e->shift_l; | ||
982 | mask = e->mask << e->shift_l; | ||
983 | if (e->shift_l != e->shift_r) { | ||
984 | if (ucontrol->value.enumerated.item[1] >= e->items) | ||
985 | return -EINVAL; | ||
986 | val |= ucontrol->value.enumerated.item[1] << e->shift_r; | ||
987 | mask |= e->mask << e->shift_r; | ||
988 | } | ||
989 | |||
990 | return snd_soc_update_bits(codec, e->reg, mask, val); | ||
991 | } | 976 | } |
992 | 977 | ||
993 | /* | 978 | /* |