Re: [PATCH 0/7] iio: dac: Convert several drivers to devm_mutex_init()
From: Jonathan Cameron
Date: Mon Apr 20 2026 - 09:44:55 EST
On Fri, 10 Apr 2026 15:03:33 -0500
David Lechner <dlechner@xxxxxxxxxxxx> wrote:
> On 4/10/26 2:37 PM, David Carlier wrote:
> >
> > This series converts seven iio DAC/ADDAC drivers to use devm_mutex_init()
> > instead of mutex_init(). These drivers currently call mutex_init() in
> > probe but have no .remove() callback, so mutex_destroy() is never called
> > on device unbind.
> >
> > Same pattern already accepted in iio for other drivers (e.g. ad5446,
> > ltc2688, ad7124, ad7606, vcnl4000, etc.).
> >
> > David Carlier (7):
> > iio: dac: ad3552r: Use devm_mutex_init()
> > iio: dac: ad7303: Use devm_mutex_init()
> > iio: dac: ad5758: Use devm_mutex_init()
> > iio: dac: ad5755: Use devm_mutex_init()
> > iio: dac: ad5686: Use devm_mutex_init()
> > iio: dac: ltc2664: Use devm_mutex_init()
> > iio: addac: ad74115: Use devm_mutex_init()
> >
>
> Jonathan has mentioned before that he doesn't care to take patches like this
> unless we are making other cleanups to the driver too. So we'll see what he
> says this time.
>
The one time I'm more flexible on taking small changes is when they come
from someone new to the kernel. A quick look suggests that's not quite true
of David, but David also doesn't seem to be an old hand. So I'll take
this set, but no more of these please unless part of a more general
cleanup of a driver. Maybe at somepoint in the future we'll have few enough
of these that it makes sense to do this for all of them, but right now there
are ~300 mutex_init() calls in IIO and don't want anywhere near that level
of churn when there are more useful things to do!
Applied to the testing branch of iio.git.
Thanks,
Jonathan