diff options
author | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2021-04-02 20:45:40 +0200 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2021-04-07 09:36:39 +0200 |
commit | aef3ef165972ca16e3b87ec024e6edfad642e230 (patch) | |
tree | 3559d337b90a41c8d78ca61febb93188ff43ab09 /drivers/iio | |
parent | iio:adc:exynos-adc: Use new IRQF_NO_AUTOEN flag rather than separate irq_disa... (diff) | |
download | linux-aef3ef165972ca16e3b87ec024e6edfad642e230.tar.xz linux-aef3ef165972ca16e3b87ec024e6edfad642e230.zip |
iio:adc:nau7802: Use IRQF_NO_AUTOEN instead of request then disable
Whilst a race during interrupt enabling is probably not a problem,
it is better to not enable the interrupt at all. The new
IRQF_NO_AUTOEN flag allows us to do that.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
Reviewed-by: Barry Song <song.bao.hua@hisilicon.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Link: https://lore.kernel.org/r/20210402184544.488862-4-jic23@kernel.org
Diffstat (limited to 'drivers/iio')
-rw-r--r-- | drivers/iio/adc/nau7802.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/iio/adc/nau7802.c b/drivers/iio/adc/nau7802.c index 07c85434b568..bb70b51d25b1 100644 --- a/drivers/iio/adc/nau7802.c +++ b/drivers/iio/adc/nau7802.c @@ -498,7 +498,8 @@ static int nau7802_probe(struct i2c_client *client, ret = request_threaded_irq(client->irq, NULL, nau7802_eoc_trigger, - IRQF_TRIGGER_HIGH | IRQF_ONESHOT, + IRQF_TRIGGER_HIGH | IRQF_ONESHOT | + IRQF_NO_AUTOEN, client->dev.driver->name, indio_dev); if (ret) { @@ -513,8 +514,7 @@ static int nau7802_probe(struct i2c_client *client, dev_info(&client->dev, "Failed to allocate IRQ, using polling mode\n"); client->irq = 0; - } else - disable_irq(client->irq); + } } if (!client->irq) { |