iio: adc: ti-ads1015: use irq_get_trigger_type()
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 1 Sep 2024 13:59:38 +0000 (14:59 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 30 Sep 2024 08:20:58 +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>
Link: https://patch.msgid.link/20240901135950.797396-4-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/ti-ads1015.c

index 6d1bc9659946df0be15ebc550c84e966a90c9fce..052d2124b21570e0b90fd4aa4048adcc921301ef 100644 (file)
@@ -1032,8 +1032,7 @@ static int ads1015_probe(struct i2c_client *client)
        }
 
        if (client->irq && chip->has_comparator) {
-               unsigned long irq_trig =
-                       irqd_get_trigger_type(irq_get_irq_data(client->irq));
+               unsigned long irq_trig = irq_get_trigger_type(client->irq);
                unsigned int cfg_comp_mask = ADS1015_CFG_COMP_QUE_MASK |
                        ADS1015_CFG_COMP_LAT_MASK | ADS1015_CFG_COMP_POL_MASK;
                unsigned int cfg_comp =