diff options
author | Keith Short <keithshort@chromium.org> | 2023-04-17 14:17:50 -0600 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-04-17 23:28:50 +0000 |
commit | 2ed86ebbcb85842532c9e80e5a82711a1caab1cc (patch) | |
tree | ea345579ec42fbfeab68164d53399054dd0d6123 /common | |
parent | 187f87afaa39ed24c0a6fa30782b6379ed05fed1 (diff) | |
download | chrome-ec-2ed86ebbcb85842532c9e80e5a82711a1caab1cc.tar.gz |
zephyr: Eliminate pointer from SYS_INIT functions
The upstream change
https://github.com/zephyrproject-rtos/zephyr/pull/51217 modified the
function signature for the SYS_INIT call, eliminating the unused device
pointer.
Run the Zephyr provided script
./zephyr/scripts/utils/migrate_sys_init.py to update all callers.
BUG=b:278595739
BRANCH=none
TEST=zmake build -a
Cq-Depend: chromium:4422804
Change-Id: I881bc536cef43a7c3ac4bc5eb3ce1893237bbd1f
Signed-off-by: Keith Short <keithshort@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4437049
Reviewed-by: Tristan Honscheid <honscheid@google.com>
Diffstat (limited to 'common')
-rw-r--r-- | common/i2c_controller.c | 4 | ||||
-rw-r--r-- | common/mkbp_event.c | 4 | ||||
-rw-r--r-- | common/motion_sense.c | 4 | ||||
-rw-r--r-- | common/usbc/ap_vdm_control.c | 4 | ||||
-rw-r--r-- | common/usbc/usb_pd_dpm.c | 4 |
5 files changed, 5 insertions, 15 deletions
diff --git a/common/i2c_controller.c b/common/i2c_controller.c index 3332f771f6..f84b329d8d 100644 --- a/common/i2c_controller.c +++ b/common/i2c_controller.c @@ -52,10 +52,8 @@ BUILD_ASSERT(ARRAY_SIZE(port_mutex) < 32); static uint8_t port_protected[I2C_PORT_COUNT + I2C_BITBANG_PORT_COUNT]; #ifdef CONFIG_ZEPHYR -static int init_port_mutex(const struct device *dev) +static int init_port_mutex(void) { - ARG_UNUSED(dev); - for (int i = 0; i < ARRAY_SIZE(port_mutex); ++i) k_mutex_init(port_mutex + i); diff --git a/common/mkbp_event.c b/common/mkbp_event.c index 3b26ad48bf..f36f455ee6 100644 --- a/common/mkbp_event.c +++ b/common/mkbp_event.c @@ -80,10 +80,8 @@ static uint32_t mkbp_host_event_wake_mask = CONFIG_MKBP_HOST_EVENT_WAKEUP_MASK; #endif /* CONFIG_MKBP_HOST_EVENT_WAKEUP_MASK */ #ifdef CONFIG_ZEPHYR -static int init_mkbp_mutex(const struct device *dev) +static int init_mkbp_mutex(void) { - ARG_UNUSED(dev); - k_mutex_init(&state.lock); return 0; diff --git a/common/motion_sense.c b/common/motion_sense.c index d2a51fc2a4..546034c7e2 100644 --- a/common/motion_sense.c +++ b/common/motion_sense.c @@ -76,10 +76,8 @@ static atomic_t odr_event_required; __maybe_unused static int fifo_int_enabled; #ifdef CONFIG_ZEPHYR -static int init_sensor_mutex(const struct device *dev) +static int init_sensor_mutex(void) { - ARG_UNUSED(dev); - k_mutex_init(&g_sensor_mutex); return 0; diff --git a/common/usbc/ap_vdm_control.c b/common/usbc/ap_vdm_control.c index b2786a58dd..08b8f727d6 100644 --- a/common/usbc/ap_vdm_control.c +++ b/common/usbc/ap_vdm_control.c @@ -57,12 +57,10 @@ static struct { } ap_storage[CONFIG_USB_PD_PORT_MAX_COUNT]; #ifdef CONFIG_ZEPHYR -static int init_ap_vdm_mutexes(const struct device *dev) +static int init_ap_vdm_mutexes(void) { int port; - ARG_UNUSED(dev); - for (port = 0; port < CONFIG_USB_PD_PORT_MAX_COUNT; port++) { k_mutex_init(&ap_storage[port].queue_lock); } diff --git a/common/usbc/usb_pd_dpm.c b/common/usbc/usb_pd_dpm.c index 9a9e102b6e..0324132ac2 100644 --- a/common/usbc/usb_pd_dpm.c +++ b/common/usbc/usb_pd_dpm.c @@ -142,12 +142,10 @@ static void print_current_state(const int port) } #ifdef CONFIG_ZEPHYR -static int init_dpm_mutexes(const struct device *dev) +static int init_dpm_mutexes(void) { int port; - ARG_UNUSED(dev); - for (port = 0; port < CONFIG_USB_PD_PORT_MAX_COUNT; port++) { k_mutex_init(&dpm[port].vdm_req_mutex); } |