diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2022-07-07 11:17:39 -0700 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-08-03 22:01:59 +0000 |
commit | 13c3d7e861b177d65ef996f9eb907aebdfc41538 (patch) | |
tree | 8713c7e09d4b75f2cfad5870c14a08fb8894b9fe /common/motion_sense_fifo.c | |
parent | 52b676ffd7f8665b01f37ebb515b9ba911561fc9 (diff) | |
download | chrome-ec-13c3d7e861b177d65ef996f9eb907aebdfc41538.tar.gz |
motion_sense_fifo: use is_new_timestamp
Hide bit field inside is_new_timestamp() for consistency
BUG=none
BRANCH=brya
TEST=make runtests
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Change-Id: Ide3c2d9beeee131c49c5dcf9a9a0055540b8e6a3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3754210
Reviewed-by: Yuval Peress <peress@google.com>
Diffstat (limited to 'common/motion_sense_fifo.c')
-rw-r--r-- | common/motion_sense_fifo.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/motion_sense_fifo.c b/common/motion_sense_fifo.c index f045aa32ac..f1dcd52a25 100644 --- a/common/motion_sense_fifo.c +++ b/common/motion_sense_fifo.c @@ -264,7 +264,7 @@ static void fifo_stage_unit(struct ec_response_motion_sensor_data *data, if (removed) { mutex_unlock(&g_sensor_mutex); if (IS_ENABLED(CONFIG_ONLINE_CALIB) && - next_timestamp_initialized & BIT(data->sensor_num)) + !is_new_timestamp(data->sensor_num)) online_calibration_process_data( data, sensor, next_timestamp[data->sensor_num].next); @@ -515,7 +515,7 @@ commit_data_end: * sensor or the timestamp is after our computed next, skip * ahead. */ - if (!(next_timestamp_initialized & BIT(sensor_num)) || + if (is_new_timestamp(sensor_num) || time_after(data->timestamp, next_timestamp[sensor_num].prev)) { next_timestamp[sensor_num].next = data->timestamp; |