diff options
author | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2021-04-02 19:45:41 +0100 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2021-04-07 08:36:39 +0100 |
commit | ff2293ea9c17a85ca6da557a5c123b441efd46a3 (patch) | |
tree | 4fb8ae6723ea3d2f8250a703f427a883933e3d25 /drivers/iio/adc | |
parent | aef3ef165972ca16e3b87ec024e6edfad642e230 (diff) | |
download | linux-stable-ff2293ea9c17a85ca6da557a5c123b441efd46a3.tar.gz linux-stable-ff2293ea9c17a85ca6da557a5c123b441efd46a3.tar.bz2 linux-stable-ff2293ea9c17a85ca6da557a5c123b441efd46a3.zip |
iio:adc:sun4i-gpadc: Use new IRQF_NO_AUTOEN flag instead of request then disable
This new flag ensures a requested irq is not autoenabled, thus removing
the need for the disable_irq() that follows and closing off any chance
of spurious interrupts.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Maxime Ripard <maxime.ripard@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-5-jic23@kernel.org
Diffstat (limited to 'drivers/iio/adc')
-rw-r--r-- | drivers/iio/adc/sun4i-gpadc-iio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iio/adc/sun4i-gpadc-iio.c b/drivers/iio/adc/sun4i-gpadc-iio.c index 99b43f28e879..2d393a4dfff6 100644 --- a/drivers/iio/adc/sun4i-gpadc-iio.c +++ b/drivers/iio/adc/sun4i-gpadc-iio.c @@ -470,7 +470,8 @@ static int sun4i_irq_init(struct platform_device *pdev, const char *name, } *irq = ret; - ret = devm_request_any_context_irq(&pdev->dev, *irq, handler, 0, + ret = devm_request_any_context_irq(&pdev->dev, *irq, handler, + IRQF_NO_AUTOEN, devname, info); if (ret < 0) { dev_err(&pdev->dev, "could not request %s interrupt: %d\n", @@ -478,7 +479,6 @@ static int sun4i_irq_init(struct platform_device *pdev, const char *name, return ret; } - disable_irq(*irq); atomic_set(atomic, 0); return 0; |