Re: [PATCH v3 2/4] iio: vcnl4000: Add event support for VCNL4010/20.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux