mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-17 22:56:47 +07:00
iio: imu: st_lsm6dsx: grab conf mutex in st_lsm6dsx_write_event_config
Always grub conf mutex in st_lsm6dsx_write_event_config since it can run
concurrently with FIFO configuration
Fixes: b5969abfa8
("iio: imu: st_lsm6dsx: add motion events")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
04ca37d5ad
commit
d278d44794
@ -1619,7 +1619,9 @@ static int st_lsm6dsx_write_event_config(struct iio_dev *iio_dev,
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
mutex_lock(&hw->conf_lock);
|
||||
err = st_lsm6dsx_sensor_set_enable(sensor, state);
|
||||
mutex_unlock(&hw->conf_lock);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user