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_mpu6050: 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-12-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

+1 -8
+1 -8
drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
··· 1859 1859 struct inv_mpu6050_platform_data *pdata; 1860 1860 struct device *dev = regmap_get_device(regmap); 1861 1861 int result; 1862 - struct irq_data *desc; 1863 1862 int irq_type; 1864 1863 1865 1864 indio_dev = devm_iio_device_alloc(dev, sizeof(*st)); ··· 1892 1893 } 1893 1894 1894 1895 if (irq > 0) { 1895 - desc = irq_get_irq_data(irq); 1896 - if (!desc) { 1897 - dev_err(dev, "Could not find IRQ %d\n", irq); 1898 - return -EINVAL; 1899 - } 1900 - 1901 - irq_type = irqd_get_trigger_type(desc); 1896 + irq_type = irq_get_trigger_type(irq); 1902 1897 if (!irq_type) 1903 1898 irq_type = IRQF_TRIGGER_RISING; 1904 1899 } else {