From ea082645c0d156f651b07fa5f4cf4a18cd0c03b5 Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Wed, 5 Oct 2011 10:29:20 +0300 Subject: [PATCH] --- yaml --- r: 270779 b: refs/heads/master c: e49b68339ebc7d2e67dc1ae16a4ac6a35fcfc9d5 h: refs/heads/master i: 270777: 4ae8e9334c618e0421e9da089b9aa9124c549d6a 270775: ee73f6d901f578bf1d492ab72b28153f5f2eb175 v: v3 --- [refs] | 2 +- trunk/sound/soc/codecs/twl6040.c | 18 ++++++------------ 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/[refs] b/[refs] index e0cc8d32b5a6..8afdae619af0 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0f9887d11e7c59ebae5e464f30a6dde788ed9011 +refs/heads/master: e49b68339ebc7d2e67dc1ae16a4ac6a35fcfc9d5 diff --git a/trunk/sound/soc/codecs/twl6040.c b/trunk/sound/soc/codecs/twl6040.c index 11f681b15dec..4ad04e3d5c40 100644 --- a/trunk/sound/soc/codecs/twl6040.c +++ b/trunk/sound/soc/codecs/twl6040.c @@ -796,20 +796,14 @@ static int twl6040_get_volsw(struct snd_kcontrol *kcontrol, out = &twl6040_priv->handsfree; break; default: - break; - } - - if (out) { - ucontrol->value.integer.value[0] = out->left_vol; - ucontrol->value.integer.value[1] = out->right_vol; - return 0; + dev_warn(codec->dev, "%s: Unexpected register: 0x%02x\n", + __func__, mc->reg); + return -EINVAL; } - /* call the appropriate handler depending on the rreg */ - if (mc->rreg) - return snd_soc_get_volsw_2r(kcontrol, ucontrol); - else - return snd_soc_get_volsw(kcontrol, ucontrol); + ucontrol->value.integer.value[0] = out->left_vol; + ucontrol->value.integer.value[1] = out->right_vol; + return 0; } /*