diff options
Diffstat (limited to 'drivers/iio/adc/ad7766.c')
-rw-r--r-- | drivers/iio/adc/ad7766.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/iio/adc/ad7766.c b/drivers/iio/adc/ad7766.c index b6b6765be7b4..1e41759f3ee5 100644 --- a/drivers/iio/adc/ad7766.c +++ b/drivers/iio/adc/ad7766.c @@ -253,21 +253,19 @@ static int ad7766_probe(struct spi_device *spi) return -ENOMEM; ad7766->trig->ops = &ad7766_trigger_ops; - ad7766->trig->dev.parent = &spi->dev; iio_trigger_set_drvdata(ad7766->trig, ad7766); - ret = devm_request_irq(&spi->dev, spi->irq, ad7766_irq, - IRQF_TRIGGER_FALLING, dev_name(&spi->dev), - ad7766->trig); - if (ret < 0) - return ret; - /* * The device generates interrupts as long as it is powered up. * Some platforms might not allow the option to power it down so - * disable the interrupt to avoid extra load on the system + * don't enable the interrupt to avoid extra load on the system */ - disable_irq(spi->irq); + ret = devm_request_irq(&spi->dev, spi->irq, ad7766_irq, + IRQF_TRIGGER_FALLING | IRQF_NO_AUTOEN, + dev_name(&spi->dev), + ad7766->trig); + if (ret < 0) + return ret; ret = devm_iio_trigger_register(&spi->dev, ad7766->trig); if (ret) |