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: common: st: use irq_get_trigger_type()

Use irq_get_trigger_type() to replace getting the irq data then the
type in two steps.

Tweak ordering to put the comment before we get the trigger type.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20240901135950.797396-5-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

+1 -1
+1 -1
drivers/iio/common/st_sensors/st_sensors_trigger.c
··· 134 134 iio_trigger_set_drvdata(sdata->trig, indio_dev); 135 135 sdata->trig->ops = trigger_ops; 136 136 137 - irq_trig = irqd_get_trigger_type(irq_get_irq_data(sdata->irq)); 138 137 /* 139 138 * If the IRQ is triggered on falling edge, we need to mark the 140 139 * interrupt as active low, if the hardware supports this. 141 140 */ 141 + irq_trig = irq_get_trigger_type(sdata->irq); 142 142 switch(irq_trig) { 143 143 case IRQF_TRIGGER_FALLING: 144 144 case IRQF_TRIGGER_LOW: