[alsa-devel] [PATCH] ak4642: show error if register write fails

Mark Brown broonie at kernel.org
Tue Mar 11 00:40:38 CET 2014


On Mon, Mar 10, 2014 at 06:15:55PM +0000, Ben Dooks wrote:

> +/* wrapper functions to show any errors to updating register values */
> +
> +static inline int ak4642_update_bits(struct snd_soc_codec *codec,
> +				     unsigned int reg,
> +				     unsigned int mask, unsigned int val)
> +{
> +	int ret = snd_soc_update_bits(codec, reg, mask, val);
> +
> +	if (ret < 0) {
> +		pr_info("%s: error %d writing %04x (%08x, mask %08x)\n",
> +			codec->name, ret, reg, mask, val);

Two things here.  One is that this should be a dev_err() and the other
is that if this is worth doing shouldn't it just be in the core - I see
nothing driver specific here?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20140310/f8e6641f/attachment.sig>


More information about the Alsa-devel mailing list