Skip to content

Commit

Permalink
iio: imu: inv_icm42600: delete unneeded update watermark call
Browse files Browse the repository at this point in the history
commit 245f3b149e6cc3ac6ee612cdb7042263bfc9e73c upstream.

Update watermark will be done inside the hwfifo_set_watermark callback
just after the update_scan_mode. It is useless to do it here.

Fixes: 7f85e42 ("iio: imu: inv_icm42600: add buffer support in iio devices")
Cc: stable@vger.kernel.org
Signed-off-by: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com>
Link: https://lore.kernel.org/r/20240527210008.612932-1-inv.git-commit@tdk.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
jmaneyrol-invn authored and gregkh committed Jun 21, 2024
1 parent 5a5595a commit 5faae25
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
4 changes: 0 additions & 4 deletions drivers/iio/imu/inv_icm42600/inv_icm42600_accel.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,6 @@ static int inv_icm42600_accel_update_scan_mode(struct iio_dev *indio_dev,
/* update data FIFO write */
inv_sensors_timestamp_apply_odr(ts, 0, 0, 0);
ret = inv_icm42600_buffer_set_fifo_en(st, fifo_en | st->fifo.en);
if (ret)
goto out_unlock;

ret = inv_icm42600_buffer_update_watermark(st);

out_unlock:
mutex_unlock(&st->lock);
Expand Down
4 changes: 0 additions & 4 deletions drivers/iio/imu/inv_icm42600/inv_icm42600_gyro.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,6 @@ static int inv_icm42600_gyro_update_scan_mode(struct iio_dev *indio_dev,
/* update data FIFO write */
inv_sensors_timestamp_apply_odr(ts, 0, 0, 0);
ret = inv_icm42600_buffer_set_fifo_en(st, fifo_en | st->fifo.en);
if (ret)
goto out_unlock;

ret = inv_icm42600_buffer_update_watermark(st);

out_unlock:
mutex_unlock(&st->lock);
Expand Down

0 comments on commit 5faae25

Please sign in to comment.