Thread (39 messages) flat view 39 messages, 6 authors, 18d ago

Re: [PATCH v4 01/14] iio: adc: adi-axi-adc: Initialize state mutex

From: Jonathan Cameron <jic23@kernel.org>
Date: 2026-08-23 19:05:46
Also in: linux-doc, linux-gpio, linux-iio, lkml

On Sun, 23 Aug 2026 19:52:15 +0100
Jonathan Cameron [off-list ref] wrote:
On Fri, 21 Aug 2026 16:06:54 +0200
Janani Sunil [off-list ref] wrote:
quoted
The AXI ADC register access paths serialize transactions with st->lock,
but probe does not initialize it. Initialize the mutex before registering
the backend.

Fixes: 7ecb8ee5c93b ("iio: adc: adi-axi-adc: support digital interface calibration")
Signed-off-by: Janani Sunil <janani.sunil@analog.com>
---  
Where a patch has already been queued, please add a note here to say so.

Until the bots get a little more clever about dependencies than I think
they are today, it makes sense to keep the patches in the series but I
don't want anyone to waste their time checking again stuff we already have
headed for upstream!
Sashiko is repeatedly failing to apply this one and given how well it is now
doing at finding bugs that makes me nervous about considering picking this up
without that extra layer of checking.

See if you can work out why it isn't applying. Maybe there is another dependency
it isn't seeing?

Jonathan
Jonathan
quoted
 drivers/iio/adc/adi-axi-adc.c | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/drivers/iio/adc/adi-axi-adc.c b/drivers/iio/adc/adi-axi-adc.c
index 26b9c75bd4d8..b5e59b1871b6 100644
--- a/drivers/iio/adc/adi-axi-adc.c
+++ b/drivers/iio/adc/adi-axi-adc.c
@@ -684,6 +684,10 @@ static int adi_axi_adc_probe(struct platform_device *pdev)
 	if (!st)
 		return -ENOMEM;
 
+	ret = devm_mutex_init(dev, &st->lock);
+	if (ret)
+		return ret;
+
 	base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(base))
 		return PTR_ERR(base);
  
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help