volteer: convert sensor mutexes to use K_MUTEX_DEFINE
Convert sensor mutexes to use K_MUTEX_DEFINE(), removing the
requirement for runtime initialization on Zephyr.
BRANCH=none
TEST=zmake testall && make buildall
/******************************************************************************/
/* Sensors */
-static mutex_t g_lid_accel_mutex;
-static mutex_t g_base_mutex;
+K_MUTEX_DEFINE(g_lid_accel_mutex);
+K_MUTEX_DEFINE(g_base_mutex);
/* BMA253 private data */
static struct accelgyro_saved_data_t g_bma253_data;
@@ -213,19 +213,6 @@ const struct motion_sensor_t *motion_als_sensors[] = {
};
BUILD_ASSERT(ARRAY_SIZE(motion_als_sensors) == ALS_COUNT);
-#ifdef CONFIG_ZEPHYR
-static int init_sensor_mutex(const struct device *dev)
-{
- ARG_UNUSED(dev);
-
- k_mutex_init(&g_lid_accel_mutex);
- k_mutex_init(&g_base_mutex);
-
- return 0;
-}
-SYS_INIT(init_sensor_mutex, POST_KERNEL, 50);
-#endif /* CONFIG_ZEPHYR */
-
static void baseboard_sensors_init(void)
{
/* Note - BMA253 interrupt unused by EC */
