Messages in this thread | | | From | Andy Shevchenko <> | Date | Tue, 21 Apr 2020 03:41:12 +0300 | Subject | Re: [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
| |