From 2798c6ef62c6b1c07d024f98caec71d4662b091c Mon Sep 17 00:00:00 2001 From: Jack Rosenthal Date: Tue, 23 Mar 2021 15:59:33 -0600 Subject: isl923x: change control1_mutex to use K_MUTEX_DEFINE Convert control1_mutex to use K_MUTEX_DEFINE(), removing the requirement for runtime initialization on Zephyr. BUG=b:177677037 BRANCH=none TEST=zmake testall && make buildall Signed-off-by: Jack Rosenthal Change-Id: I4aa0cba73e4283d6050ddbe46bda542788bcab0f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2782238 Reviewed-by: Simon Glass --- driver/charger/isl923x.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'driver') diff --git a/driver/charger/isl923x.c b/driver/charger/isl923x.c index 2f822d64e1..129fe30000 100644 --- a/driver/charger/isl923x.c +++ b/driver/charger/isl923x.c @@ -95,7 +95,7 @@ enum isl923x_mon_dir { MON_CHARGE = 0, MON_DISCHARGE = 1 }; static int learn_mode; /* Mutex for CONTROL1 register, that can be updated from multiple tasks. */ -static mutex_t control1_mutex; +K_MUTEX_DEFINE(control1_mutex); static enum ec_error_list isl923x_discharge_on_ac(int chgnum, int enable); @@ -559,7 +559,6 @@ static void isl923x_init(int chgnum) int precharge_voltage = bi->precharge_voltage ? bi->precharge_voltage : bi->voltage_min; - (void)k_mutex_init(&control1_mutex); if (IS_ENABLED(CONFIG_CHARGER_RAA489000)) { if (CONFIG_CHARGER_SENSE_RESISTOR == CONFIG_CHARGER_SENSE_RESISTOR_AC) { -- cgit v1.2.1