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: gyro: mpu3050: use irq_get_trigger_type()

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

Tweaked ordering wrt to comment whilst here.

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

+1 -1
+1 -1
drivers/iio/gyro/mpu3050-core.c
··· 1059 1059 /* Check if IRQ is open drain */ 1060 1060 mpu3050->irq_opendrain = device_property_read_bool(dev, "drive-open-drain"); 1061 1061 1062 - irq_trig = irqd_get_trigger_type(irq_get_irq_data(irq)); 1063 1062 /* 1064 1063 * Configure the interrupt generator hardware to supply whatever 1065 1064 * the interrupt is configured for, edges low/high level low/high, 1066 1065 * we can provide it all. 1067 1066 */ 1067 + irq_trig = irq_get_trigger_type(irq); 1068 1068 switch (irq_trig) { 1069 1069 case IRQF_TRIGGER_RISING: 1070 1070 dev_info(&indio_dev->dev,