Re: [PATCH 7/7] iio: light: opt3001: switch driver to managed resources

From: Joshua Crofts

Date: Mon May 11 2026 - 07:23:27 EST


On Mon, 11 May 2026 at 13:13, Andy Shevchenko
<andriy.shevchenko@xxxxxxxxx> wrote:
>
> On Mon, May 11, 2026 at 12:04:12PM +0200, Joshua Crofts via B4 Relay wrote:
>
> > Move the driver to use devm_* functions to automate resource
> > management and simplify error handling. This also allows removal
> > of the opt3001_remove() function.
>
> ...
>
> > - ret = request_threaded_irq(irq, NULL, opt3001_irq,
> > - IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
> > - "opt3001", iio);
> > + ret = devm_request_threaded_irq(dev, irq, NULL, opt3001_irq,
> > + IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
> > + "opt3001", iio);
> > if (ret)
> > return dev_err_probe(dev, ret,
> > "failed to request IRQ #%d\n",
>
> You need to drop now duplicate error message.

Oh yeah, I remember you doing that fix in the AK8975 series :)
Good point.

--
Kind regards

CJD