Message ID | 20240901135950.797396-16-jic23@kernel.org (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | IIO: use irq_get_trigger_type() instead of opencoding. | expand |
On Sun, Sep 01, 2024 at 02:59:50PM +0100, Jonathan Cameron wrote: > From: Jonathan Cameron <Jonathan.Cameron@huawei.com> > > Use irq_get_trigger_type() to replace getting the irq data then the > type in two steps. > > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> > --- > drivers/iio/pressure/bmp280-core.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/iio/pressure/bmp280-core.c b/drivers/iio/pressure/bmp280-core.c > index da379230c837..b156dd763cf3 100644 > --- a/drivers/iio/pressure/bmp280-core.c > +++ b/drivers/iio/pressure/bmp280-core.c > @@ -2596,7 +2596,7 @@ static int bmp085_fetch_eoc_irq(struct device *dev, > unsigned long irq_trig; > int ret; > > - irq_trig = irqd_get_trigger_type(irq_get_irq_data(irq)); > + irq_trig = irq_get_trigger_type(irq); > if (irq_trig != IRQF_TRIGGER_RISING) { > dev_err(dev, "non-rising trigger given for EOC interrupt, trying to enforce it\n"); > irq_trig = IRQF_TRIGGER_RISING; > -- > 2.46.0 > Hi Jonathan, Tested-by: Vasileios Amoiridis <vassilisamir@gmail.com>
diff --git a/drivers/iio/pressure/bmp280-core.c b/drivers/iio/pressure/bmp280-core.c index da379230c837..b156dd763cf3 100644 --- a/drivers/iio/pressure/bmp280-core.c +++ b/drivers/iio/pressure/bmp280-core.c @@ -2596,7 +2596,7 @@ static int bmp085_fetch_eoc_irq(struct device *dev, unsigned long irq_trig; int ret; - irq_trig = irqd_get_trigger_type(irq_get_irq_data(irq)); + irq_trig = irq_get_trigger_type(irq); if (irq_trig != IRQF_TRIGGER_RISING) { dev_err(dev, "non-rising trigger given for EOC interrupt, trying to enforce it\n"); irq_trig = IRQF_TRIGGER_RISING;