summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNuno Sa <nuno.sa@analog.com>2024-08-06 17:40:49 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-09-12 11:13:06 +0200
commit6e4bf8e79966f6e4cc7e21d9f8d1eb0fbe5b8b9b (patch)
tree3850cefa9b91d7a0b8662379bc24df6f17eeb1b2
parent0e79ed236b4d6d5ef595db6097e2ec10b7bde8d9 (diff)
iio: adc: ad_sigma_delta: fix irq_flags on irq request
commit e81bb580ec08d7503c14c92157d810d306290003 upstream. With commit 7b0c9f8fa3d2 ("iio: adc: ad_sigma_delta: Add optional irq selection"), we can get the irq line from struct ad_sigma_delta_info instead of the spi device. However, in devm_ad_sd_probe_trigger(), when getting the irq_flags with irq_get_trigger_type() we are still using the spi device irq instead of the one used for devm_request_irq(). Fixes: 7b0c9f8fa3d2 ("iio: adc: ad_sigma_delta: Add optional irq selection") Signed-off-by: Nuno Sa <nuno.sa@analog.com> Link: https://patch.msgid.link/20240806-dev-fix-ad-sigma-delta-v1-1-aa25b173c063@analog.com Cc: <stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/iio/adc/ad_sigma_delta.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/adc/ad_sigma_delta.c b/drivers/iio/adc/ad_sigma_delta.c
index a2b87f6b7a07..6231c635803d 100644
--- a/drivers/iio/adc/ad_sigma_delta.c
+++ b/drivers/iio/adc/ad_sigma_delta.c
@@ -568,7 +568,7 @@ EXPORT_SYMBOL_NS_GPL(ad_sd_validate_trigger, IIO_AD_SIGMA_DELTA);
static int devm_ad_sd_probe_trigger(struct device *dev, struct iio_dev *indio_dev)
{
struct ad_sigma_delta *sigma_delta = iio_device_get_drvdata(indio_dev);
- unsigned long irq_flags = irq_get_trigger_type(sigma_delta->spi->irq);
+ unsigned long irq_flags = irq_get_trigger_type(sigma_delta->irq_line);
int ret;
if (dev != &sigma_delta->spi->dev) {