[PATCH 08/20] iio: accel: cros_ec_accel_legacy: make use of iio_get_masklength()

Nuno Sá noname.nuno at gmail.com
Wed Jul 3 00:08:14 PDT 2024


On Wed, 2024-07-03 at 09:37 +0300, Alexandru Ardelean wrote:
> On Tue, Jul 2, 2024 at 7:02 PM Nuno Sa via B4 Relay
> <devnull+nuno.sa.analog.com at kernel.org> wrote:
> > 
> > From: Nuno Sa <nuno.sa at analog.com>
> > 
> > Ue iio_get_masklength() to access '.masklength' so it can be annotated
> > as __private when there are no more direct users of it.
> > 
> 
> I would have suggested maybe a "iio_for_each_active_channel()" here
> instead, but after looking into the driver a bit more, it looks like
> it's part of a broader rework.
> 

Yeah, we have a scan_mask that I don't think it's guaranteed to be indio_dev-
>active_scan_mask. Also don't think (at this point) we need another
iio_for_each_active_channel() helper which takes mask as most of usecases use
indio_dev->active_scan_mask

- Nuno Sá
> 



More information about the linux-arm-kernel mailing list