Re: [PATCH v2 09/10] iio: light: opt3001: switch driver to managed resources
From: Jonathan Cameron
Date: Sat May 16 2026 - 08:10:35 EST
On Tue, 12 May 2026 15:26:00 +0100
Jonathan Cameron <jic23@xxxxxxxxxx> wrote:
> On Tue, 12 May 2026 12:57:29 +0200
> Joshua Crofts via B4 Relay <devnull+joshua.crofts1.gmail.com@xxxxxxxxxx> wrote:
>
> > From: Joshua Crofts <joshua.crofts1@xxxxxxxxx>
> >
> > Move the driver to use devm_* functions to automate resource
> > management and simplify error handling. This also allows removal
> > of the opt3001_remove() function.
> >
> > Signed-off-by: Joshua Crofts <joshua.crofts1@xxxxxxxxx>
> Some trivial stuff inline. I'll probably wait for sashiko to catch up with
> it's backlog and get to this one. If nothing comes up there or in other reviews
> I'm fine tweaking the stuff below whilst applying the series.
>
Sashiko did come back with a lifetime issue.
I think it's a false positive as there aren't any workqueues or similar
that might still be active. IRQs will long have been cleaned up before
the mutex_destroy() occurs.
Anyhow, do take a look
https://sashiko.dev/#/patchset/20260512-opt3001-cleanup-v2-0-8018cf3a8a0a%40gmail.com
and make sure I'm not missing anything!
Jonathan