Skip to content

Commit

Permalink
iio: adc: ad_sigma_delta: fix irq_flags on irq request
Browse files Browse the repository at this point in the history
commit e81bb58 upstream.

With commit 7b0c9f8 ("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: 7b0c9f8 ("iio: adc: ad_sigma_delta: Add optional irq selection")
Signed-off-by: Nuno Sa <[email protected]>
Link: https://patch.msgid.link/[email protected]
Cc: <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
nunojsa authored and gregkh committed Sep 12, 2024
1 parent 0e79ed2 commit 6e4bf8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/iio/adc/ad_sigma_delta.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 6e4bf8e

Please sign in to comment.