summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew McRae <amcrae@google.com>2022-12-16 00:52:31 +1100
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-12-16 02:39:03 +0000
commit5ae29642992939402683ac004d493353b38b2efc (patch)
tree4d7668aed5e91850043750506b3abfe76021535c
parentd32df7a74cba2d3862bdbc062e48df526d39bbb7 (diff)
downloadchrome-ec-5ae29642992939402683ac004d493353b38b2efc.tar.gz
8042: Init mutex when running on Zephyr
When running on Zephyr, mutexes must be explicitly initialized. BUG=b:246531214 TEST=Verify keyboard works reliably. BRANCH=none Change-Id: I0044ee1b65ade7a61bc1bf78dedb384929917cec Signed-off-by: Andrew McRae <amcrae@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4111480 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/keyboard_8042.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/keyboard_8042.c b/common/keyboard_8042.c
index 6e2b14719f..02b4d4dc5c 100644
--- a/common/keyboard_8042.c
+++ b/common/keyboard_8042.c
@@ -90,7 +90,7 @@ enum scancode_set_list {
* Mutex to control write access to the to-host buffer head. Don't need to
* mutex the tail because reads are only done in one place.
*/
-static mutex_t to_host_mutex;
+K_MUTEX_DEFINE(to_host_mutex);
/* Queue command/data to the host */
enum {