diff options
author | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2024-09-01 14:59:45 +0100 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2024-09-30 09:20:58 +0100 |
commit | 95bce3fcdbfaffb12c3203d08b9d44c8e12b527b (patch) | |
tree | a5957bacea0bdec59982be38979a1baba91f3c49 /drivers/iio/imu | |
parent | 9c1125b4c4d6b144f910d1e93db05ebf37c83b5e (diff) | |
download | linux-stable-95bce3fcdbfaffb12c3203d08b9d44c8e12b527b.tar.gz linux-stable-95bce3fcdbfaffb12c3203d08b9d44c8e12b527b.tar.bz2 linux-stable-95bce3fcdbfaffb12c3203d08b9d44c8e12b527b.zip |
iio: imu: inv_icm42600: 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-11-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/imu')
-rw-r--r-- | drivers/iio/imu/inv_icm42600/inv_icm42600_core.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/iio/imu/inv_icm42600/inv_icm42600_core.c b/drivers/iio/imu/inv_icm42600/inv_icm42600_core.c index c3924cc6190e..93b5d7a3339c 100644 --- a/drivers/iio/imu/inv_icm42600/inv_icm42600_core.c +++ b/drivers/iio/imu/inv_icm42600/inv_icm42600_core.c @@ -673,7 +673,6 @@ int inv_icm42600_core_probe(struct regmap *regmap, int chip, int irq, { struct device *dev = regmap_get_device(regmap); struct inv_icm42600_state *st; - struct irq_data *irq_desc; int irq_type; bool open_drain; int ret; @@ -683,14 +682,7 @@ int inv_icm42600_core_probe(struct regmap *regmap, int chip, int irq, return -ENODEV; } - /* get irq properties, set trigger falling by default */ - irq_desc = irq_get_irq_data(irq); - if (!irq_desc) { - dev_err(dev, "could not find IRQ %d\n", irq); - return -EINVAL; - } - - irq_type = irqd_get_trigger_type(irq_desc); + irq_type = irq_get_trigger_type(irq); if (!irq_type) irq_type = IRQF_TRIGGER_FALLING; |