iio: pressure: bmp280: use irq_get_trigger_type()
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 1 Sep 2024 13:59:50 +0000 (14:59 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 30 Sep 2024 08:20:59 +0000 (09:20 +0100)
Use irq_get_trigger_type() to replace getting the irq data then the
type in two steps.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Vasileios Amoiridis <vassilisamir@gmail.com>
Link: https://patch.msgid.link/20240901135950.797396-16-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/pressure/bmp280-core.c

index da379230c83700384e300d84ad673af8eb11c28e..b156dd763cf31de08d182a54bdf3120ab29ce9f2 100644 (file)
@@ -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;