[alsa-devel] [PATCH v2 10/10] ASoC: twl6040: Warn user in twl6040_put_volsw for error case
Peter Ujfalusi
peter.ujfalusi at ti.com
Wed Oct 5 09:29:28 CEST 2011
Let the user know, that the callback has been called with unexpected
register parameter.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi at ti.com>
---
sound/soc/codecs/twl6040.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c
index 7450e1b..62edded 100644
--- a/sound/soc/codecs/twl6040.c
+++ b/sound/soc/codecs/twl6040.c
@@ -759,6 +759,8 @@ static int twl6040_put_volsw(struct snd_kcontrol *kcontrol,
out = &twl6040_priv->handsfree;
break;
default:
+ dev_warn(codec->dev, "%s: Unexpected register: 0x%02x\n",
+ __func__, mc->reg);
return -EINVAL;
}
--
1.7.7
More information about the Alsa-devel
mailing list