summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2022-09-22 10:22:19 -0700
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-10-20 17:39:24 +0000
commit804fd201145d1c8011ce10f416e39087611394ee (patch)
tree0e22b6e970f16478c9c08c6e2c9cd26eb9a17f97
parent810dd2e30bd4b767b6704b336b5bd945b575868e (diff)
downloadchrome-ec-804fd201145d1c8011ce10f416e39087611394ee.tar.gz
motion_sense_fifo: Remove mutex around _needed/_reset flags
Since these functions and setting the flags are always done in the motion sensor stack, mutex are not needed. BUG=none BRANCH=many TEST=make buildall Change-Id: I69bd3bced554e7aff66622b7ffb76e2d72fa9a9d Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3966708 Reviewed-by: Yuval Peress <peress@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
-rw-r--r--common/motion_sense_fifo.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/common/motion_sense_fifo.c b/common/motion_sense_fifo.c
index 672b328420..15db978a0b 100644
--- a/common/motion_sense_fifo.c
+++ b/common/motion_sense_fifo.c
@@ -381,30 +381,18 @@ void motion_sense_fifo_init(void)
int motion_sense_fifo_bypass_needed(void)
{
- int res;
-
- mutex_lock(&g_sensor_mutex);
- res = bypass_needed;
- mutex_unlock(&g_sensor_mutex);
- return res;
+ return bypass_needed;
}
int motion_sense_fifo_wake_up_needed(void)
{
- int res;
-
- mutex_lock(&g_sensor_mutex);
- res = wake_up_needed;
- mutex_unlock(&g_sensor_mutex);
- return res;
+ return wake_up_needed;
}
void motion_sense_fifo_reset_needed_flags(void)
{
- mutex_lock(&g_sensor_mutex);
wake_up_needed = 0;
bypass_needed = 0;
- mutex_unlock(&g_sensor_mutex);
}
void motion_sense_fifo_insert_async_event(struct motion_sensor_t *sensor,