power: change pwr_5v_ctl_mtx to use K_MUTEX_DEFINE
Use K_MUTEX_DEFINE() to automatically initialize this mutex, removing
the requirement to call k_mutex_init().
BRANCH=none
TEST=zmake testall && make buildall
@@ -1036,7 +1036,7 @@ __overridable void board_power_5v_enable(int enable)
/* 5V enable request bitmask from various tasks. */
static uint32_t pwr_5v_en_req;
-static mutex_t pwr_5v_ctl_mtx;
+K_MUTEX_DEFINE(pwr_5v_ctl_mtx);
void power_5v_enable(task_id_t tid, int enable)
{
@@ -1061,12 +1061,6 @@ static void restore_enable_5v_state(void)
const uint32_t *state;
int size;
- /*
- * Initialize the mutex for ZephyrOS.
- * This does nothing for non-Zephyr builds.
- */
- (void)k_mutex_init(&pwr_5v_ctl_mtx);
-
state = (const uint32_t *) system_get_jump_tag(P5_SYSJUMP_TAG, 0,
&size);
if (state && size == sizeof(pwr_5v_en_req)) {
