lkml.org 
[lkml]   [2020]   [Apr]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v3 2/4] iio: vcnl4000: Add event support for VCNL4010/20.
On Mon, Apr 20, 2020 at 11:43 AM Mathieu Othacehe <m.othacehe@gmail.com> wrote:
>
> The VCNL4010 and VCNL4020 chips are able to raise interrupts on proximity
> threshold events. Add support for threshold rising and falling events for
> those two chips.

...

> + ret = (ret & VCNL4000_SELF_TIMED_EN) > 0;

This can be done outside of lock.
And here is type violation. Use bool for the function.

> +end:
> + mutex_unlock(&data->vcnl4000_lock);
> +
> + return ret;
> +}

...

> + ret = (ret & VCNL4010_INT_THR_EN) > 0;
> +
> +end:
> + mutex_unlock(&data->vcnl4000_lock);
> +
> + return ret;
> +}

Ditto.

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2020-04-21 02:41    [W:2.028 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site