Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

+1 -9
+1 -9
drivers/iio/imu/inv_icm42600/inv_icm42600_core.c
··· 673 673 { 674 674 struct device *dev = regmap_get_device(regmap); 675 675 struct inv_icm42600_state *st; 676 - struct irq_data *irq_desc; 677 676 int irq_type; 678 677 bool open_drain; 679 678 int ret; ··· 682 683 return -ENODEV; 683 684 } 684 685 685 - /* get irq properties, set trigger falling by default */ 686 - irq_desc = irq_get_irq_data(irq); 687 - if (!irq_desc) { 688 - dev_err(dev, "could not find IRQ %d\n", irq); 689 - return -EINVAL; 690 - } 691 - 692 - irq_type = irqd_get_trigger_type(irq_desc); 686 + irq_type = irq_get_trigger_type(irq); 693 687 if (!irq_type) 694 688 irq_type = IRQF_TRIGGER_FALLING; 695 689