lkml.org 
[lkml]   [2014]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] ASoC: twl4030: don't report EBUSY if no change requested.
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).
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2014-11-08 11:01    [W:2.050 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site