Re: [PATCH RFC 1/6] iio: core: Match iio_device_claim_*() return semantics
From: Andy Shevchenko
Date: Thu Dec 04 2025 - 10:06:07 EST
On Thu, Dec 4, 2025 at 4:22 PM Nuno Sá <noname.nuno@xxxxxxxxx> wrote:
> On Wed, 2025-12-03 at 14:18 -0500, Kurt Borja wrote:
> > In order to improve API consistency with conditional locks, use
> > true/false return semantics in iio_device_claim_buffer_mode().
> >
> > This also matches iio_device_claim_direct() return semantics.
> Even if the rest gets a NACK, I think at least this patch makes sense. In fact I
> would even extend it so that we have the same inline API with proper annotations:
>
> https://elixir.bootlin.com/linux/v6.18/source/include/linux/iio/iio.h#L679
>
> So it really has the same semantics as iio_device_claim_direct()
I remember I looked into this when Jonathan provided an API, but I
have no memory of why we have the -EBUSY which is not used in the
callers.
--
With Best Regards,
Andy Shevchenko