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

Nuno Sá noname.nuno at gmail.com
Wed Oct 5 01:40:03 PDT 2022


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 at 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 at 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á 




More information about the Linux-rockchip mailing list