iio: adc: ade9000: move mutex init before IRQ registration
Subsystems (3)
Antoniu Miclaus
maintainerPATCH 1/1 iio: adc: ade9000: move mutex init before IRQ registration
Move devm_mutex_init() before ade9000_request_irq() calls so that st->lock is initialized before any handler that depends on it can run.
--- drivers/iio/adc/ade9000.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/iio/adc/ade9000.c +4 -4
@@ -1706,19 +1706,19 @@ static int ade9000_probe(struct spi_device *spi)init_completion (&st->reset_completion); - ret =ade9000_request_irq (dev,"irq0" , ade9000_irq0_thread, indio_dev); + ret =devm_mutex_init (dev, &st->lock);if (ret)return ret; - ret =ade9000_request_irq (dev,"irq1" , ade9000_irq1_thread, indio_dev); + ret =ade9000_request_irq (dev,"irq0" , ade9000_irq0_thread, indio_dev);if (ret)return ret; - ret =ade9000_request_irq (dev,"dready" , ade9000_dready_thread, indio_dev); + ret =ade9000_request_irq (dev,"irq1" , ade9000_irq1_thread, indio_dev);if (ret)return ret; - ret =devm_mutex_init (dev, &st->lock); + ret =ade9000_request_irq (dev,"dready" , ade9000_dready_thread, indio_dev);if (ret)return ret;
Signature · 1 line
2.43.0
Quoted 2 lines · Antoniu Miclaus
Move
devm_mutex_init()beforeade9000_request_irq()calls so thatst->lockis initialized before any handler that depends on it can run.
Sounds good. The technique to reproduce this (in case you have a HWr to make sure probe runs) the kernel configuration should have CONFIG_DEBUG_SHIRQ=y (and in some cases a tweak in the code to flag IRQ as shared).
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 11 lines · On Sat, 28 Feb 2026 13:05:18 +0200 Andy Shevchenko…
Quoted 2 lines · Antoniu Miclaus
Move
devm_mutex_init()beforeade9000_request_irq()calls so thatst->lockis initialized before any handler that depends on it can run.Sounds good. The technique to reproduce this (in case you have a HWr to make sure probe runs) the kernel configuration should have
CONFIG_DEBUG_SHIRQ=y(and in some cases a tweak in the code to flag IRQ as shared).Reviewed-by Andy Shevchenko <[email protected]>
Applied as a fix, so I added a Fixes tag and +CC stable.
Whilst hard to hit it is is always good to ensure we are safe against spurious interrupts.
thanks,
Jonathan