diff options
author | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2024-09-01 14:59:40 +0100 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2024-09-30 09:20:58 +0100 |
commit | 8491eeff3588a969044c8635bcaa41ca447d5a80 (patch) | |
tree | a929b40ae8d14548eaad4033f432c6ff3b3b56f3 | |
parent | d5ab4e9a10ae3c4eee42eca49f71f442a7a7d05e (diff) | |
download | lwn-8491eeff3588a969044c8635bcaa41ca447d5a80.tar.gz lwn-8491eeff3588a969044c8635bcaa41ca447d5a80.zip |
iio: gyro: fxas21002c: 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>
Link: https://patch.msgid.link/20240901135950.797396-6-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-rw-r--r-- | drivers/iio/gyro/fxas21002c_core.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/iio/gyro/fxas21002c_core.c b/drivers/iio/gyro/fxas21002c_core.c index c28d17ca6f5e..688966129f70 100644 --- a/drivers/iio/gyro/fxas21002c_core.c +++ b/drivers/iio/gyro/fxas21002c_core.c @@ -849,8 +849,7 @@ static int fxas21002c_trigger_probe(struct fxas21002c_data *data) if (!data->dready_trig) return -ENOMEM; - irq_trig = irqd_get_trigger_type(irq_get_irq_data(data->irq)); - + irq_trig = irq_get_trigger_type(data->irq); if (irq_trig == IRQF_TRIGGER_RISING) { ret = regmap_field_write(data->regmap_fields[F_IPOL], 1); if (ret < 0) |