iio: adis16480: Use irq types instead of flags
authorNuno Sá <nuno.sa@analog.com>
Wed, 1 Jul 2020 12:07:02 +0000 (14:07 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 7 Jul 2020 19:24:07 +0000 (20:24 +0100)
The value retrieved by `irqd_get_trigger_type()` is not an irq flag.
While the values are the same, the meaning is different.

Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/imu/adis16480.c

index 5163749f568eeba6a7869b6c421a090a7e285347..1eb4f98076f15fc2d2f3f6239dc9cf959092db51 100644 (file)
@@ -1102,12 +1102,12 @@ static int adis16480_config_irq_pin(struct device_node *of_node,
        /*
         * Get the interrupt line behaviour. The data ready polarity can be
         * configured as positive or negative, corresponding to
-        * IRQF_TRIGGER_RISING or IRQF_TRIGGER_FALLING respectively.
+        * IRQ_TYPE_EDGE_RISING or IRQ_TYPE_EDGE_FALLING respectively.
         */
        irq_type = irqd_get_trigger_type(desc);
-       if (irq_type == IRQF_TRIGGER_RISING) { /* Default */
+       if (irq_type == IRQ_TYPE_EDGE_RISING) { /* Default */
                val |= ADIS16480_DRDY_POL(1);
-       } else if (irq_type == IRQF_TRIGGER_FALLING) {
+       } else if (irq_type == IRQ_TYPE_EDGE_FALLING) {
                val |= ADIS16480_DRDY_POL(0);
        } else {
                dev_err(&st->adis.spi->dev,