Re: [PATCH v2 11/12] iio: dac: ad5686: write_raw: use guard(mutex)()
From: Nuno Sá
Date: Tue Jun 09 2026 - 07:51:51 EST
On Tue, Jun 09, 2026 at 12:26:05PM +0200, Joshua Crofts wrote:
> On Tue, 09 Jun 2026 11:13:06 +0100
> Rodrigo Alencar via B4 Relay <devnull+rodrigo.alencar.analog.com@xxxxxxxxxx> wrote:
>
> > From: Rodrigo Alencar <rodrigo.alencar@xxxxxxxxxx>
> >
> > Use guarded mutex lock to facilitate code review when adding new
> > attributes. This will allow for early returns, avoiding error-prone
> > locking and unlocking in error paths. Gain-control support will add
> > the scale attribute.
> >
> > Signed-off-by: Rodrigo Alencar <rodrigo.alencar@xxxxxxxxxx>
>
> Althoug <linux/cleanup.h> is included in <linux/device.h>, it's better
> to explicitly add the include for it as IIO drivers are currently being
> moved away from these catch-all headers.
Also we wanna use the IWYU principle (which should not be only an IIO
thing :)).
- Nuno Sá
>
> With that fixed,
>
> Reviewed-by: Joshua Crofts <joshua.crofts1@xxxxxxxxx>
>
> --
> Kind regards
>
> CJD