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: magn: ak8974: 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>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://patch.msgid.link/20240901135950.797396-15-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

+1 -1
+1 -1
drivers/iio/magnetometer/ak8974.c
··· 910 910 911 911 /* If we have a valid DRDY IRQ, make use of it */ 912 912 if (irq > 0) { 913 - irq_trig = irqd_get_trigger_type(irq_get_irq_data(irq)); 913 + irq_trig = irq_get_trigger_type(irq); 914 914 if (irq_trig == IRQF_TRIGGER_RISING) { 915 915 dev_info(&i2c->dev, "enable rising edge DRDY IRQ\n"); 916 916 } else if (irq_trig == IRQF_TRIGGER_FALLING) {