From 2f7c68cb55ecb7331f2381deb497c27155f32faf Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Wed, 03 Jan 2024 09:43:39 +0000 Subject: [PATCH] update kernel to 5.10.198 --- kernel/drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/kernel/drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c b/kernel/drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c index 99576b2..32d7f83 100644 --- a/kernel/drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c +++ b/kernel/drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c @@ -275,8 +275,13 @@ { struct inv_icm42600_state *st = iio_device_get_drvdata(indio_dev); struct device *dev = regmap_get_device(st->map); + struct inv_icm42600_timestamp *ts = iio_priv(indio_dev); pm_runtime_get_sync(dev); + + mutex_lock(&st->lock); + inv_icm42600_timestamp_reset(ts); + mutex_unlock(&st->lock); return 0; } @@ -375,7 +380,6 @@ struct device *dev = regmap_get_device(st->map); unsigned int sensor; unsigned int *watermark; - struct inv_icm42600_timestamp *ts; struct inv_icm42600_sensor_conf conf = INV_ICM42600_SENSOR_CONF_INIT; unsigned int sleep_temp = 0; unsigned int sleep_sensor = 0; @@ -385,11 +389,9 @@ if (indio_dev == st->indio_gyro) { sensor = INV_ICM42600_SENSOR_GYRO; watermark = &st->fifo.watermark.gyro; - ts = iio_priv(st->indio_gyro); } else if (indio_dev == st->indio_accel) { sensor = INV_ICM42600_SENSOR_ACCEL; watermark = &st->fifo.watermark.accel; - ts = iio_priv(st->indio_accel); } else { return -EINVAL; } @@ -416,8 +418,6 @@ /* if FIFO is off, turn temperature off */ if (!st->fifo.on) ret = inv_icm42600_set_temp_conf(st, false, &sleep_temp); - - inv_icm42600_timestamp_reset(ts); out_unlock: mutex_unlock(&st->lock); -- Gitblit v1.6.2