diff mbox series

iio: adc: ad_sigma_delta: fix irq_flags on irq request

Message ID 20240806-dev-fix-ad-sigma-delta-v1-1-aa25b173c063@analog.com (mailing list archive)
State Accepted
Headers show
Series iio: adc: ad_sigma_delta: fix irq_flags on irq request | expand

Commit Message

Nuno Sa via B4 Relay Aug. 6, 2024, 3:40 p.m. UTC
From: Nuno Sa <nuno.sa@analog.com>

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>
---
 drivers/iio/adc/ad_sigma_delta.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


---
base-commit: 593737c18ae789dc6e4b493510a0c00977972e2e
change-id: 20240806-dev-fix-ad-sigma-delta-3d10146d22a6
--

Thanks!
- Nuno Sá

Comments

Jonathan Cameron Aug. 6, 2024, 3:58 p.m. UTC | #1
On Tue, 06 Aug 2024 17:40:49 +0200
Nuno Sa via B4 Relay <devnull+nuno.sa.analog.com@kernel.org> wrote:

> From: Nuno Sa <nuno.sa@analog.com>
> 
> 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>
Applied to the fixes-togreg branch of iio.git and marked for stable.

Thanks,

Jonathan

> ---
>  drivers/iio/adc/ad_sigma_delta.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/adc/ad_sigma_delta.c b/drivers/iio/adc/ad_sigma_delta.c
> index 389930186bb6..e2bed2d648f2 100644
> --- a/drivers/iio/adc/ad_sigma_delta.c
> +++ b/drivers/iio/adc/ad_sigma_delta.c
> @@ -569,7 +569,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) {
> 
> ---
> base-commit: 593737c18ae789dc6e4b493510a0c00977972e2e
> change-id: 20240806-dev-fix-ad-sigma-delta-3d10146d22a6
> --
> 
> Thanks!
> - Nuno Sá
> 
>
diff mbox series

Patch

diff --git a/drivers/iio/adc/ad_sigma_delta.c b/drivers/iio/adc/ad_sigma_delta.c
index 389930186bb6..e2bed2d648f2 100644
--- a/drivers/iio/adc/ad_sigma_delta.c
+++ b/drivers/iio/adc/ad_sigma_delta.c
@@ -569,7 +569,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) {