diff options
author | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2024-09-01 14:59:49 +0100 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2024-09-30 09:20:59 +0100 |
commit | df2976072c697618d7b2230fc267a9145ae6f94a (patch) | |
tree | ab18fb429b0363aa50a043ee0569fda04b216c2a /drivers/iio/magnetometer | |
parent | a9facbf521e7b02b2123ae141fc21ff273ebacf3 (diff) |
iio: magn: ak8974: use irq_get_trigger_type()
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>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://patch.msgid.link/20240901135950.797396-15-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/magnetometer')
-rw-r--r-- | drivers/iio/magnetometer/ak8974.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/magnetometer/ak8974.c b/drivers/iio/magnetometer/ak8974.c index 961b1e0bfb13..8306a18706ac 100644 --- a/drivers/iio/magnetometer/ak8974.c +++ b/drivers/iio/magnetometer/ak8974.c @@ -910,7 +910,7 @@ static int ak8974_probe(struct i2c_client *i2c) /* If we have a valid DRDY IRQ, make use of it */ if (irq > 0) { - 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_info(&i2c->dev, "enable rising edge DRDY IRQ\n"); } else if (irq_trig == IRQF_TRIGGER_FALLING) { |