mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-28 15:20:41 +00: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
1 changed files with 2 additions and 0 deletions
|
@ -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 a new issue