On Mon, Apr 20, 2020 at 11:43 AM Mathieu Othacehe <m.othacehe@xxxxxxxxx> 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