We only need available scan_masks set if we are going to use the onboard fifo. Unfortunately it requires the IRQ pins to be connected to the SoC. The next patch in this series add support for iio triggered buffer for use with iio triggers. Signed-off-by: Sean Nyekjaer <sean@xxxxxxxxxx> --- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c index cf82c9049945..1ca69598678f 100644 --- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c +++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c @@ -1007,7 +1007,6 @@ static struct iio_dev *st_lsm6dsx_alloc_iiodev(struct st_lsm6dsx_hw *hw, iio_dev->modes = INDIO_DIRECT_MODE; iio_dev->dev.parent = hw->dev; - iio_dev->available_scan_masks = st_lsm6dsx_available_scan_masks; sensor = iio_priv(iio_dev); sensor->id = id; @@ -1074,6 +1073,9 @@ int st_lsm6dsx_probe(struct device *dev, int irq, int hw_id, const char *name, hw->iio_devs[i] = st_lsm6dsx_alloc_iiodev(hw, i, name); if (!hw->iio_devs[i]) return -ENOMEM; + + hw->iio_devs[i]->available_scan_masks = + st_lsm6dsx_available_scan_masks; } err = st_lsm6dsx_init_device(hw); -- 2.21.0