From: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx> Andy pointed out in a review that there is an irq_get_trigger_type() helper that first gets the irq data then extracts the type from it. This saves on opencoding those two steps when the irq data isn't used for anything else. Update all the sites this pattern occurs in IIO to use the helper. In a few cases there will be a slightly different error message is somehow there is a valid irq number passed to this call and it doesn't have the data associated with it. Jonathan Cameron (15): iio: accel: adxl380: use irq_get_trigger_type() iio: accel: fxls8962af: use irq_get_trigger_type() iio: adc: ti-ads1015: use irq_get_trigger_type() iio: common: st: use irq_get_trigger_type() iio: gyro: fxas21002c: use irq_get_trigger_type() iio: gyro: mpu3050: use irq_get_trigger_type() iio: humidity: hts221: use irq_get_trigger_type() iio: imu: bmi160: use irq_get_trigger_type() iio: imu: bmi323: use irq_get_trigger_type() iio: imu: inv_icm42600: use irq_get_trigger_type() iio: imu: inv_mpu6050: use irq_get_trigger_type() iio: imu: st_lsm6dsx: use irq_get_trigger_type() iio: light: st_uvis25: use irq_get_trigger_type() iio: magn: ak8974: use irq_get_trigger_type() iio: pressure: bmp280: use irq_get_trigger_type() drivers/iio/accel/adxl380.c | 7 +------ drivers/iio/accel/fxls8962af-core.c | 2 +- drivers/iio/adc/ti-ads1015.c | 2 +- drivers/iio/common/st_sensors/st_sensors_trigger.c | 2 +- drivers/iio/gyro/fxas21002c_core.c | 2 +- drivers/iio/gyro/mpu3050-core.c | 2 +- drivers/iio/humidity/hts221_buffer.c | 2 +- drivers/iio/imu/bmi160/bmi160_core.c | 11 +---------- drivers/iio/imu/bmi323/bmi323_core.c | 8 +------- drivers/iio/imu/inv_icm42600/inv_icm42600_core.c | 10 +--------- drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 9 +-------- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 2 +- drivers/iio/light/st_uvis25_core.c | 2 +- drivers/iio/magnetometer/ak8974.c | 2 +- drivers/iio/pressure/bmp280-core.c | 2 +- 15 files changed, 15 insertions(+), 50 deletions(-) -- 2.46.0