aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/iio/accel/st_accel_core.c1
-rw-r--r--drivers/iio/common/st_sensors/st_sensors_core.c2
-rw-r--r--drivers/iio/gyro/st_gyro_core.c1
-rw-r--r--drivers/iio/magnetometer/st_magn_core.c1
-rw-r--r--drivers/iio/pressure/st_pressure_core.c1
5 files changed, 4 insertions, 2 deletions
diff --git a/drivers/iio/accel/st_accel_core.c b/drivers/iio/accel/st_accel_core.c
index 58d1d13d552a..211b13271c61 100644
--- a/drivers/iio/accel/st_accel_core.c
+++ b/drivers/iio/accel/st_accel_core.c
@@ -546,6 +546,7 @@ int st_accel_common_probe(struct iio_dev *indio_dev)
546 546
547 indio_dev->modes = INDIO_DIRECT_MODE; 547 indio_dev->modes = INDIO_DIRECT_MODE;
548 indio_dev->info = &accel_info; 548 indio_dev->info = &accel_info;
549 mutex_init(&adata->tb.buf_lock);
549 550
550 st_sensors_power_enable(indio_dev); 551 st_sensors_power_enable(indio_dev);
551 552
diff --git a/drivers/iio/common/st_sensors/st_sensors_core.c b/drivers/iio/common/st_sensors/st_sensors_core.c
index edd13d2b4121..8dd0477e201c 100644
--- a/drivers/iio/common/st_sensors/st_sensors_core.c
+++ b/drivers/iio/common/st_sensors/st_sensors_core.c
@@ -304,8 +304,6 @@ int st_sensors_init_sensor(struct iio_dev *indio_dev,
304 struct st_sensors_platform_data *of_pdata; 304 struct st_sensors_platform_data *of_pdata;
305 int err = 0; 305 int err = 0;
306 306
307 mutex_init(&sdata->tb.buf_lock);
308
309 /* If OF/DT pdata exists, it will take precedence of anything else */ 307 /* If OF/DT pdata exists, it will take precedence of anything else */
310 of_pdata = st_sensors_of_probe(indio_dev->dev.parent, pdata); 308 of_pdata = st_sensors_of_probe(indio_dev->dev.parent, pdata);
311 if (of_pdata) 309 if (of_pdata)
diff --git a/drivers/iio/gyro/st_gyro_core.c b/drivers/iio/gyro/st_gyro_core.c
index 21395f26d227..ffe96642b6d0 100644
--- a/drivers/iio/gyro/st_gyro_core.c
+++ b/drivers/iio/gyro/st_gyro_core.c
@@ -400,6 +400,7 @@ int st_gyro_common_probe(struct iio_dev *indio_dev)
400 400
401 indio_dev->modes = INDIO_DIRECT_MODE; 401 indio_dev->modes = INDIO_DIRECT_MODE;
402 indio_dev->info = &gyro_info; 402 indio_dev->info = &gyro_info;
403 mutex_init(&gdata->tb.buf_lock);
403 404
404 st_sensors_power_enable(indio_dev); 405 st_sensors_power_enable(indio_dev);
405 406
diff --git a/drivers/iio/magnetometer/st_magn_core.c b/drivers/iio/magnetometer/st_magn_core.c
index 8ade473f99fe..2e56f812a644 100644
--- a/drivers/iio/magnetometer/st_magn_core.c
+++ b/drivers/iio/magnetometer/st_magn_core.c
@@ -369,6 +369,7 @@ int st_magn_common_probe(struct iio_dev *indio_dev)
369 369
370 indio_dev->modes = INDIO_DIRECT_MODE; 370 indio_dev->modes = INDIO_DIRECT_MODE;
371 indio_dev->info = &magn_info; 371 indio_dev->info = &magn_info;
372 mutex_init(&mdata->tb.buf_lock);
372 373
373 st_sensors_power_enable(indio_dev); 374 st_sensors_power_enable(indio_dev);
374 375
diff --git a/drivers/iio/pressure/st_pressure_core.c b/drivers/iio/pressure/st_pressure_core.c
index 97baf40d424b..e881fa6291e9 100644
--- a/drivers/iio/pressure/st_pressure_core.c
+++ b/drivers/iio/pressure/st_pressure_core.c
@@ -417,6 +417,7 @@ int st_press_common_probe(struct iio_dev *indio_dev)
417 417
418 indio_dev->modes = INDIO_DIRECT_MODE; 418 indio_dev->modes = INDIO_DIRECT_MODE;
419 indio_dev->info = &press_info; 419 indio_dev->info = &press_info;
420 mutex_init(&press_data->tb.buf_lock);
420 421
421 st_sensors_power_enable(indio_dev); 422 st_sensors_power_enable(indio_dev);
422 423