Re: [PATCH v2 16/16] iio: core: move 'mlock' to 'struct iio_dev_opaque'

Nuno Sá
2022-10-05T08:39:25Z

On Tue, 2022-10-04 at 17:21 +0300, Andy Shevchenko wrote:
> On Tue, Oct 4, 2022 at 4:49 PM Nuno Sá <nuno.sa@analog.com> wrote:
> >
> > Now that there are no more users accessing 'mlock' directly, we can
> > move
> > it to the iio_dev private structure. Hence, it's now explicit that
> > new
> > driver's should not directly this lock.
>
> use this
>
>
> I like the end result!
> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
>
> P.S. Shouldn't we annotate the respective APIs with might_sleep() and
> Co (if it's not done yet)?
>
>

Hmm, I would say this is the same story as with sparse annotations... I
guess, at least, might_sleep() would make sense but I think we should
probably do it for the complete IIO subsystem where it makes sense
instead of having it in just this new API.

- Nuno Sá