mirror of
https://github.com/torvalds/linux.git
synced 2024-12-31 23:31:29 +00:00
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
This commit is contained in:
parent
aef3ef1659
commit
ff2293ea9c
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user