> -----Original Message----- > From: Jonathan Cameron [mailto:jic23@xxxxxxxxxx] > Sent: Saturday, April 3, 2021 7:46 AM > To: linux-iio@xxxxxxxxxxxxxxx > Cc: Song Bao Hua (Barry Song) <song.bao.hua@xxxxxxxxxxxxx>; Jonathan Cameron > <jonathan.cameron@xxxxxxxxxx>; Maxime Ripard <maxime.ripard@xxxxxxxxxxx> > Subject: [PATCH 4/7] iio:adc:sun4i-gpadc: Use new IRQF_NO_AUTOEN flag instead > of request then disable > > From: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx> > > 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@xxxxxxxxxx> > Cc: Maxime Ripard <maxime.ripard@xxxxxxxxxxx> > --- Reviewed-by: Barry Song <song.bao.hua@xxxxxxxxxxxxx> > drivers/iio/adc/sun4i-gpadc-iio.c | 4 ++-- > 1 file 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; > -- > 2.31.1