Re: [PATCH v3 3/9] iio: amplifiers: ad8366: use devm_mutex_init() and drop mutex_init()
From: Andy Shevchenko
Date: Tue Feb 03 2026 - 20:54:02 EST
On Tue, Feb 03, 2026 at 11:24:09AM +0000, Rodrigo Alencar via B4 Relay wrote:
> Adopt proper mutex lifecycle with devm_mutex_init(),
> replacing mutex_init().
...
It's better to add here
struct device *dev = &spi->dev;
and (re-)use it in all followup patches. This will make the code easier
to read.
> + ret = devm_mutex_init(&spi->dev, &st->lock);
> + if (ret)
> + return ret;
--
With Best Regards,
Andy Shevchenko