ASoC: twl6040: Warn user in twl6040_put_volsw for error case
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Wed, 5 Oct 2011 07:29:28 +0000 (10:29 +0300)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 5 Oct 2011 16:10:10 +0000 (17:10 +0100)
Let the user know, that the callback has been called with unexpected
register parameter.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/codecs/twl6040.c

index 7450e1bb816459dfc9b3b34c8ce9ff568d998ed4..62edded0b54932da4421cf95da2316daa260ebae 100644 (file)
@@ -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;
        }