summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2021-03-23 15:48:40 -0600
committerCommit Bot <commit-bot@chromium.org>2021-03-23 23:22:00 +0000
commitea37a1154cd0882633ab10e0823f51d8c75ddea1 (patch)
tree5e3db37fde373509176f8a85f526ccd809390e00
parent416b1307caa472cacabd227d72e72c56c7a7040d (diff)
downloadchrome-ec-ea37a1154cd0882633ab10e0823f51d8c75ddea1.tar.gz
chipset: convert reset_log_mutex to use K_MUTEX_DEFINE
Using K_MUTEX_DEFINE() initializes the mutex automatically, thus removing the requirement to use k_mutex_init(). BUG=b:177677037 BRANCH=none TEST=zmake testall && make buildall Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: Icd52129fe6a3edd497a6663b3ffea10c5b7b9dce Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2782233 Reviewed-by: Simon Glass <sjg@chromium.org>
-rw-r--r--common/chipset.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/common/chipset.c b/common/chipset.c
index d53a8157a7..6275b12b85 100644
--- a/common/chipset.c
+++ b/common/chipset.c
@@ -60,7 +60,7 @@ DECLARE_HOST_COMMAND(EC_CMD_AP_RESET,
#endif
#ifdef CONFIG_CMD_AP_RESET_LOG
-static mutex_t reset_log_mutex;
+K_MUTEX_DEFINE(reset_log_mutex);
static int next_reset_log __preserved_logs(next_reset_log);
static uint32_t ap_resets_since_ec_boot;
/* keep reset_logs size a power of 2 */
@@ -83,9 +83,6 @@ void init_reset_log(void)
next_reset_log = 0;
memset(&reset_logs, 0, sizeof(reset_logs));
}
-#ifdef CONFIG_ZEPHYR
- (void)k_mutex_init(&reset_log_mutex);
-#endif
}
void report_ap_reset(enum chipset_shutdown_reason reason)