[alsa-devel] [PATCH 1/3] ASoC: twl4030: don't report EBUSY if no change requested.

Mark Brown broonie at kernel.org
Sat Nov 8 10:22:42 CET 2014


On Sat, Nov 08, 2014 at 11:38:03AM +1100, NeilBrown wrote:

> +	int val = ucontrol->value.integer.value[0];
> +
> +	if (!!(twl4030_read(codec, TWL4030_REG_CODEC_MODE)
> +	       & TWL4030_OPTION_1) == !!val)
> +		/* No change */
> +		return 0;

We shouldn't be accepting attempts to set out of range values so there
should be no need for the !! on val (which confused me when I was
reading this).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20141108/4ffeacdf/attachment.sig>


More information about the Alsa-devel mailing list