summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew McRae <amcrae@google.com>2022-12-16 01:09:03 +1100
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-12-16 02:38:51 +0000
commitd32df7a74cba2d3862bdbc062e48df526d39bbb7 (patch)
tree94ecaaa7e7e677fd921a66dc546e499cc759f76b
parent128f72d19ee52feec60a30f774cda18e0fe9d777 (diff)
downloadchrome-ec-d32df7a74cba2d3862bdbc062e48df526d39bbb7.tar.gz
dps: Init zephyr mutex
Explicitly initialize the dps_lock mutex when running on Zephyr. BUG=b:262703463 TEST=./twister -T zephyr/test BRANCH=none Change-Id: Ib0b311cd868fc314476afaa522365aba1278a1dc Signed-off-by: Andrew McRae <amcrae@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4111620 Commit-Queue: Peter Marheine <pmarheine@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Peter Marheine <pmarheine@chromium.org>
-rw-r--r--common/dps.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/dps.c b/common/dps.c
index 8facc57c68..2a05077fbf 100644
--- a/common/dps.c
+++ b/common/dps.c
@@ -40,7 +40,7 @@
BUILD_ASSERT(K_MORE_PWR > K_LESS_PWR && 100 >= K_MORE_PWR && 100 >= K_LESS_PWR);
/* lock for updating timeout value */
-static mutex_t dps_lock;
+K_MUTEX_DEFINE(dps_lock);
static timestamp_t timeout;
static bool is_enabled = true;
static int debug_level;