summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Short <keithshort@chromium.org>2023-04-17 14:17:50 -0600
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-04-17 23:28:50 +0000
commit2ed86ebbcb85842532c9e80e5a82711a1caab1cc (patch)
treeea345579ec42fbfeab68164d53399054dd0d6123
parent187f87afaa39ed24c0a6fa30782b6379ed05fed1 (diff)
downloadchrome-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>
-rw-r--r--common/i2c_controller.c4
-rw-r--r--common/mkbp_event.c4
-rw-r--r--common/motion_sense.c4
-rw-r--r--common/usbc/ap_vdm_control.c4
-rw-r--r--common/usbc/usb_pd_dpm.c4
-rw-r--r--driver/usb_mux/usb_mux.c3
-rw-r--r--power/hibernate.c2
-rw-r--r--zephyr/app/ec/chip/riscv/riscv-ite/it8xxx2-espi.c2
-rw-r--r--zephyr/drivers/cros_system/cros_system_npcx.c3
-rw-r--r--zephyr/program/corsola/src/board_chipset.c2
-rw-r--r--zephyr/program/corsola/src/ite_hooks.c2
-rw-r--r--zephyr/program/geralt/src/backlight.c2
-rw-r--r--zephyr/program/geralt/src/base_detect.c2
-rw-r--r--zephyr/program/geralt/src/hooks.c2
-rw-r--r--zephyr/program/geralt/src/ppc.c2
-rw-r--r--zephyr/program/intelrvp/adlrvp/src/adlrvp.c4
-rw-r--r--zephyr/program/intelrvp/mtlrvp/src/mtlrvp.c4
-rw-r--r--zephyr/program/nissa/joxer/src/usbc.c2
-rw-r--r--zephyr/program/nissa/nereid/src/usbc.c2
-rw-r--r--zephyr/program/nissa/yaviks/src/usbc.c2
-rw-r--r--zephyr/program/nissa/yavilla/src/usbc.c2
-rw-r--r--zephyr/program/trogdor/lazor/src/power.c2
-rw-r--r--zephyr/shim/chip/mchp/system.c4
-rw-r--r--zephyr/shim/chip/npcx/system.c4
-rw-r--r--zephyr/shim/core/cortex-m/mpu.c2
-rw-r--r--zephyr/shim/src/adc.c4
-rw-r--r--zephyr/shim/src/console.c4
-rw-r--r--zephyr/shim/src/espi.c2
-rw-r--r--zephyr/shim/src/flash.c4
-rw-r--r--zephyr/shim/src/gpio.c4
-rw-r--r--zephyr/shim/src/hooks.c4
-rw-r--r--zephyr/shim/src/ioex.c4
-rw-r--r--zephyr/shim/src/rtc.c4
-rw-r--r--zephyr/shim/src/sha256_hw.c4
-rw-r--r--zephyr/shim/src/system.c4
-rw-r--r--zephyr/shim/src/tasks.c4
-rw-r--r--zephyr/subsys/ap_pwrseq/x86_non_dsx_chipset_power_state.c3
-rw-r--r--zephyr/subsys/ap_pwrseq/x86_non_dsx_common_pwrseq_host_sleep.c2
-rw-r--r--zephyr/subsys/ap_pwrseq/x86_non_dsx_common_pwrseq_sm_handler.c2
-rw-r--r--zephyr/subsys/emul/ap_pwrseq/emul_power_signals.c3
40 files changed, 42 insertions, 80 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);
}
diff --git a/driver/usb_mux/usb_mux.c b/driver/usb_mux/usb_mux.c
index 8029fd6fe6..bf1a61c0b3 100644
--- a/driver/usb_mux/usb_mux.c
+++ b/driver/usb_mux/usb_mux.c
@@ -120,11 +120,10 @@ extern mutex_t queue_lock[];
#endif
#ifdef CONFIG_ZEPHYR
-static int init_mux_mutex(const struct device *dev)
+static int init_mux_mutex(void)
{
int port;
- ARG_UNUSED(dev);
for (port = 0; port < CONFIG_USB_PD_PORT_MAX_COUNT; port++) {
k_mutex_init(&mux_lock[port]);
diff --git a/power/hibernate.c b/power/hibernate.c
index 46c842bce6..02e4728ad2 100644
--- a/power/hibernate.c
+++ b/power/hibernate.c
@@ -167,7 +167,7 @@ host_command_hibernation_delay(struct host_cmd_handler_args *args)
DECLARE_HOST_COMMAND(EC_CMD_HIBERNATION_DELAY, host_command_hibernation_delay,
EC_VER_MASK(0));
-static int hibernate_init(const struct device *unused)
+static int hibernate_init(void)
{
static struct ap_power_ev_callback cb;
diff --git a/zephyr/app/ec/chip/riscv/riscv-ite/it8xxx2-espi.c b/zephyr/app/ec/chip/riscv/riscv-ite/it8xxx2-espi.c
index 3c623b5aac..c32d1ccd14 100644
--- a/zephyr/app/ec/chip/riscv/riscv-ite/it8xxx2-espi.c
+++ b/zephyr/app/ec/chip/riscv/riscv-ite/it8xxx2-espi.c
@@ -46,7 +46,7 @@ static void espi_enable_callback(struct ap_power_ev_callback *cb,
}
}
-static int init_espi_enable_callback(const struct device *unused)
+static int init_espi_enable_callback(void)
{
static struct ap_power_ev_callback cb;
diff --git a/zephyr/drivers/cros_system/cros_system_npcx.c b/zephyr/drivers/cros_system/cros_system_npcx.c
index 45009709cf..3a11821a32 100644
--- a/zephyr/drivers/cros_system/cros_system_npcx.c
+++ b/zephyr/drivers/cros_system/cros_system_npcx.c
@@ -632,9 +632,8 @@ DEVICE_DEFINE(cros_system_npcx_0, "CROS_SYSTEM", cros_system_npcx_init, NULL,
PINCTRL_DT_DEFINE(DBG_NODE);
-static int jtag_init(const struct device *dev)
+static int jtag_init(void)
{
- ARG_UNUSED(dev);
struct dbg_reg *const dbg_reg_base = HAL_DBG_REG_BASE_ADDR;
const struct pinctrl_dev_config *pcfg =
PINCTRL_DT_DEV_CONFIG_GET(DBG_NODE);
diff --git a/zephyr/program/corsola/src/board_chipset.c b/zephyr/program/corsola/src/board_chipset.c
index 54cc7116fd..6f4585c180 100644
--- a/zephyr/program/corsola/src/board_chipset.c
+++ b/zephyr/program/corsola/src/board_chipset.c
@@ -34,7 +34,7 @@ static void board_backlight_handler(struct ap_power_ev_callback *cb,
gpio_pin_set_dt(GPIO_DT_FROM_NODELABEL(gpio_ec_bl_en_od), value);
}
-static int install_backlight_handler(const struct device *unused)
+static int install_backlight_handler(void)
{
static struct ap_power_ev_callback cb;
diff --git a/zephyr/program/corsola/src/ite_hooks.c b/zephyr/program/corsola/src/ite_hooks.c
index 5564ea1660..817c25c0dc 100644
--- a/zephyr/program/corsola/src/ite_hooks.c
+++ b/zephyr/program/corsola/src/ite_hooks.c
@@ -65,7 +65,7 @@ static void board_suspend_handler(struct ap_power_ev_callback *cb,
gpio_pin_set_dt(GPIO_DT_FROM_NODELABEL(gpio_en_5v_usm), value);
}
-static int install_suspend_handler(const struct device *unused)
+static int install_suspend_handler(void)
{
static struct ap_power_ev_callback cb;
diff --git a/zephyr/program/geralt/src/backlight.c b/zephyr/program/geralt/src/backlight.c
index 8234191d22..cf03df4cd2 100644
--- a/zephyr/program/geralt/src/backlight.c
+++ b/zephyr/program/geralt/src/backlight.c
@@ -32,7 +32,7 @@ static void board_backlight_handler(struct ap_power_ev_callback *cb,
gpio_pin_set_dt(GPIO_DT_FROM_NODELABEL(gpio_ec_bl_en_od), value);
}
-static int install_backlight_handler(const struct device *unused)
+static int install_backlight_handler(void)
{
static struct ap_power_ev_callback cb;
diff --git a/zephyr/program/geralt/src/base_detect.c b/zephyr/program/geralt/src/base_detect.c
index feb01337ce..205b79a695 100644
--- a/zephyr/program/geralt/src/base_detect.c
+++ b/zephyr/program/geralt/src/base_detect.c
@@ -87,7 +87,7 @@ static void base_startup_hook(struct ap_power_ev_callback *cb,
}
}
-static int base_init(const struct device *unused)
+static int base_init(void)
{
static struct ap_power_ev_callback cb;
diff --git a/zephyr/program/geralt/src/hooks.c b/zephyr/program/geralt/src/hooks.c
index fd106732ae..c5c769e8f9 100644
--- a/zephyr/program/geralt/src/hooks.c
+++ b/zephyr/program/geralt/src/hooks.c
@@ -74,7 +74,7 @@ static void board_suspend_handler(struct ap_power_ev_callback *cb,
gpio_pin_set_dt(GPIO_DT_FROM_NODELABEL(gpio_en_5v_usm), value);
}
-static int install_suspend_handler(const struct device *unused)
+static int install_suspend_handler(void)
{
static struct ap_power_ev_callback cb;
diff --git a/zephyr/program/geralt/src/ppc.c b/zephyr/program/geralt/src/ppc.c
index e69aa2171c..00efa23976 100644
--- a/zephyr/program/geralt/src/ppc.c
+++ b/zephyr/program/geralt/src/ppc.c
@@ -8,7 +8,7 @@
#include <zephyr/init.h>
-static int board_usbc_init(const struct device *unused)
+static int board_usbc_init(void)
{
/* Enable PPC interrupts. */
gpio_enable_dt_interrupt(GPIO_INT_FROM_NODELABEL(int_usb_c0_ppc_bc12));
diff --git a/zephyr/program/intelrvp/adlrvp/src/adlrvp.c b/zephyr/program/intelrvp/adlrvp/src/adlrvp.c
index d7d192b1af..93a2dee0f6 100644
--- a/zephyr/program/intelrvp/adlrvp/src/adlrvp.c
+++ b/zephyr/program/intelrvp/adlrvp/src/adlrvp.c
@@ -405,10 +405,8 @@ __override bool board_is_tbt_usb4_port(int port)
return tbt_usb4;
}
-static int board_pre_task_peripheral_init(const struct device *unused)
+static int board_pre_task_peripheral_init(void)
{
- ARG_UNUSED(unused);
-
/* Initialized IOEX-0 to access IOEX-GPIOs needed pre-task */
ioex_init(IOEX_C0_PCA9675);
diff --git a/zephyr/program/intelrvp/mtlrvp/src/mtlrvp.c b/zephyr/program/intelrvp/mtlrvp/src/mtlrvp.c
index cb7e282f63..76982a81cf 100644
--- a/zephyr/program/intelrvp/mtlrvp/src/mtlrvp.c
+++ b/zephyr/program/intelrvp/mtlrvp/src/mtlrvp.c
@@ -342,10 +342,8 @@ __override enum tbt_compat_cable_speed board_get_max_tbt_speed(int port)
return max_speed;
}
-static int board_pre_task_peripheral_init(const struct device *unused)
+static int board_pre_task_peripheral_init(void)
{
- ARG_UNUSED(unused);
-
/* Only reset tcpc/pd if not sysjump */
if (!system_jumped_late()) {
/* Initialize tcpc and all ioex */
diff --git a/zephyr/program/nissa/joxer/src/usbc.c b/zephyr/program/nissa/joxer/src/usbc.c
index 3ce489e357..e3e18e0f33 100644
--- a/zephyr/program/nissa/joxer/src/usbc.c
+++ b/zephyr/program/nissa/joxer/src/usbc.c
@@ -76,7 +76,7 @@ static void board_chargers_suspend(struct ap_power_ev_callback *const cb,
fn(CHARGER_SECONDARY);
}
-static int board_chargers_suspend_init(const struct device *unused)
+static int board_chargers_suspend_init(void)
{
static struct ap_power_ev_callback cb = {
.handler = board_chargers_suspend,
diff --git a/zephyr/program/nissa/nereid/src/usbc.c b/zephyr/program/nissa/nereid/src/usbc.c
index 3ce489e357..e3e18e0f33 100644
--- a/zephyr/program/nissa/nereid/src/usbc.c
+++ b/zephyr/program/nissa/nereid/src/usbc.c
@@ -76,7 +76,7 @@ static void board_chargers_suspend(struct ap_power_ev_callback *const cb,
fn(CHARGER_SECONDARY);
}
-static int board_chargers_suspend_init(const struct device *unused)
+static int board_chargers_suspend_init(void)
{
static struct ap_power_ev_callback cb = {
.handler = board_chargers_suspend,
diff --git a/zephyr/program/nissa/yaviks/src/usbc.c b/zephyr/program/nissa/yaviks/src/usbc.c
index dcaa8221ff..c9950ae73b 100644
--- a/zephyr/program/nissa/yaviks/src/usbc.c
+++ b/zephyr/program/nissa/yaviks/src/usbc.c
@@ -77,7 +77,7 @@ static void board_chargers_suspend(struct ap_power_ev_callback *const cb,
fn(CHARGER_SECONDARY);
}
-static int board_chargers_suspend_init(const struct device *unused)
+static int board_chargers_suspend_init(void)
{
static struct ap_power_ev_callback cb = {
.handler = board_chargers_suspend,
diff --git a/zephyr/program/nissa/yavilla/src/usbc.c b/zephyr/program/nissa/yavilla/src/usbc.c
index fa280615ee..07d924e000 100644
--- a/zephyr/program/nissa/yavilla/src/usbc.c
+++ b/zephyr/program/nissa/yavilla/src/usbc.c
@@ -76,7 +76,7 @@ static void board_chargers_suspend(struct ap_power_ev_callback *const cb,
fn(CHARGER_SECONDARY);
}
-static int board_chargers_suspend_init(const struct device *unused)
+static int board_chargers_suspend_init(void)
{
static struct ap_power_ev_callback cb = {
.handler = board_chargers_suspend,
diff --git a/zephyr/program/trogdor/lazor/src/power.c b/zephyr/program/trogdor/lazor/src/power.c
index ee99c77196..5661fa8049 100644
--- a/zephyr/program/trogdor/lazor/src/power.c
+++ b/zephyr/program/trogdor/lazor/src/power.c
@@ -45,7 +45,7 @@ static void board_power_change(struct ap_power_ev_callback *cb,
}
}
-static int board_power_handler_init(const struct device *unused)
+static int board_power_handler_init(void)
{
static struct ap_power_ev_callback cb;
diff --git a/zephyr/shim/chip/mchp/system.c b/zephyr/shim/chip/mchp/system.c
index 517c928ad1..def53cdef9 100644
--- a/zephyr/shim/chip/mchp/system.c
+++ b/zephyr/shim/chip/mchp/system.c
@@ -52,10 +52,8 @@ void system_mpu_config(void)
/* Reseve for future use */
}
-static int chip_system_init(const struct device *unused)
+static int chip_system_init(void)
{
- ARG_UNUSED(unused);
-
/*
* Check BBRAM power status.
*/
diff --git a/zephyr/shim/chip/npcx/system.c b/zephyr/shim/chip/npcx/system.c
index 1fbdca0803..5c16d3bd40 100644
--- a/zephyr/shim/chip/npcx/system.c
+++ b/zephyr/shim/chip/npcx/system.c
@@ -73,10 +73,8 @@ void system_mpu_config(void)
CPU_MPU_RASR = 0x03080013;
}
-static int chip_system_init(const struct device *unused)
+static int chip_system_init(void)
{
- ARG_UNUSED(unused);
-
/*
* Check BBRAM power status.
*/
diff --git a/zephyr/shim/core/cortex-m/mpu.c b/zephyr/shim/core/cortex-m/mpu.c
index 601961225c..4f1e893d48 100644
--- a/zephyr/shim/core/cortex-m/mpu.c
+++ b/zephyr/shim/core/cortex-m/mpu.c
@@ -21,7 +21,7 @@ void mpu_enable(void)
}
}
-static int mpu_disable_fixed_regions(const struct device *dev)
+static int mpu_disable_fixed_regions(void)
{
/* MPU is configured and enabled by the Zephyr init code, disable the
* fixed sections by default.
diff --git a/zephyr/shim/src/adc.c b/zephyr/shim/src/adc.c
index 0041335662..661a3c40e1 100644
--- a/zephyr/shim/src/adc.c
+++ b/zephyr/shim/src/adc.c
@@ -40,10 +40,8 @@ const struct adc_t adc_channels[] = { DT_FOREACH_CHILD(
DT_INST(0, named_adc_channels), ADC_CHANNEL_INIT) };
#endif
-static int init_device_bindings(const struct device *device)
+static int init_device_bindings(void)
{
- ARG_UNUSED(device);
-
for (int i = 0; i < ARRAY_SIZE(adc_channels); i++) {
if (!device_is_ready(adc_channels[i].dev))
k_oops();
diff --git a/zephyr/shim/src/console.c b/zephyr/shim/src/console.c
index 2a82571065..6df3511cd1 100644
--- a/zephyr/shim/src/console.c
+++ b/zephyr/shim/src/console.c
@@ -278,7 +278,7 @@ static const char *const disabled_channels[] =
DT_PROP(EC_CONSOLE_NODE, disabled);
static const size_t disabled_channel_count =
DT_PROP_LEN(EC_CONSOLE_NODE, disabled);
-static int init_ec_console(const struct device *unused)
+static int init_ec_console(void)
{
for (size_t i = 0; i < disabled_channel_count; i++)
console_channel_disable(disabled_channels[i]);
@@ -288,7 +288,7 @@ static int init_ec_console(const struct device *unused)
SYS_INIT(init_ec_console, PRE_KERNEL_1, 50);
#endif /* CONFIG_PLATFORM_EC_CONSOLE_CHANNEL */
-static int init_ec_shell(const struct device *unused)
+static int init_ec_shell(void)
{
#if defined(CONFIG_SHELL_BACKEND_SERIAL)
shell_zephyr = shell_backend_uart_get_ptr();
diff --git a/zephyr/shim/src/espi.c b/zephyr/shim/src/espi.c
index ac7074bfa0..0fc5d2c0cb 100644
--- a/zephyr/shim/src/espi.c
+++ b/zephyr/shim/src/espi.c
@@ -692,7 +692,7 @@ static void espi_peripheral_handler(const struct device *dev,
}
}
-static int zephyr_shim_setup_espi(const struct device *unused)
+static int zephyr_shim_setup_espi(void)
{
uint32_t enable = 1;
static const struct {
diff --git a/zephyr/shim/src/flash.c b/zephyr/shim/src/flash.c
index e196166cdf..4cdd0f78f8 100644
--- a/zephyr/shim/src/flash.c
+++ b/zephyr/shim/src/flash.c
@@ -131,10 +131,8 @@ test_mockable int crec_flash_physical_read(int offset, int size, char *data)
return rv;
}
-static int flash_dev_init(const struct device *unused)
+static int flash_dev_init(void)
{
- ARG_UNUSED(unused);
-
if (!device_is_ready(cros_flash_dev) ||
!device_is_ready(flash_ctrl_dev))
k_oops();
diff --git a/zephyr/shim/src/gpio.c b/zephyr/shim/src/gpio.c
index 142f106e02..ca2f4abc5d 100644
--- a/zephyr/shim/src/gpio.c
+++ b/zephyr/shim/src/gpio.c
@@ -263,13 +263,11 @@ const struct gpio_dt_spec *gpio_get_dt_spec(enum gpio_signal signal)
/* Allow access to this function in tests so we can run it multiple times
* without having to create a new binary for each run.
*/
-test_export_static int init_gpios(const struct device *unused)
+test_export_static int init_gpios(void)
{
gpio_flags_t flags;
bool is_sys_jumped = system_jumped_to_this_image();
- ARG_UNUSED(unused);
-
for (size_t i = 0; i < ARRAY_SIZE(configs); ++i) {
int rv;
diff --git a/zephyr/shim/src/hooks.c b/zephyr/shim/src/hooks.c
index b8f9b917e4..8c49857c3e 100644
--- a/zephyr/shim/src/hooks.c
+++ b/zephyr/shim/src/hooks.c
@@ -95,7 +95,7 @@ static void check_hook_task_priority(void)
}
DECLARE_HOOK(HOOK_INIT, check_hook_task_priority, HOOK_PRIO_FIRST);
-static int zephyr_shim_setup_hooks(const struct device *unused)
+static int zephyr_shim_setup_hooks(void)
{
int rv;
@@ -217,7 +217,7 @@ static void ev_handler(struct ap_power_ev_callback *cb,
/*
* Events are received from the AP power event system and sent to the hooks.
*/
-static int zephyr_shim_ap_power_event(const struct device *unused)
+static int zephyr_shim_ap_power_event(void)
{
static struct ap_power_ev_callback cb;
diff --git a/zephyr/shim/src/ioex.c b/zephyr/shim/src/ioex.c
index afda051c8a..da8a1ea05a 100644
--- a/zephyr/shim/src/ioex.c
+++ b/zephyr/shim/src/ioex.c
@@ -34,13 +34,11 @@ int ioex_init(int ioex)
return EC_SUCCESS;
}
-static int ioex_init_default(const struct device *unused)
+static int ioex_init_default(void)
{
int ret;
int i;
- ARG_UNUSED(unused);
-
for (i = 0; i < CONFIG_IO_EXPANDER_PORT_COUNT; i++) {
/* IO Expander has been initialized, skip re-initializing */
if (ioex_config[i].flags &
diff --git a/zephyr/shim/src/rtc.c b/zephyr/shim/src/rtc.c
index 6e694d48e4..b3d2be1086 100644
--- a/zephyr/shim/src/rtc.c
+++ b/zephyr/shim/src/rtc.c
@@ -36,10 +36,8 @@ void rtc_callback(const struct device *dev)
}
/** Initialize the rtc. */
-static int system_init_rtc(const struct device *unused)
+static int system_init_rtc(void)
{
- ARG_UNUSED(unused);
-
cros_rtc_dev = DEVICE_DT_GET(CROS_RTC_NODE);
if (!cros_rtc_dev) {
LOG_ERR("Error: device %s is not ready", cros_rtc_dev->name);
diff --git a/zephyr/shim/src/sha256_hw.c b/zephyr/shim/src/sha256_hw.c
index 017b2ea857..dd6b236c3c 100644
--- a/zephyr/shim/src/sha256_hw.c
+++ b/zephyr/shim/src/sha256_hw.c
@@ -125,10 +125,8 @@ void hmac_SHA256(uint8_t *output, const uint8_t *key, const int key_len,
SHA256_DIGEST_SIZE);
}
-static int zephyr_shim_init_sha256(const struct device *unused)
+static int zephyr_shim_init_sha256(void)
{
- ARG_UNUSED(unused);
-
if (!device_is_ready(sha256_hw_dev)) {
k_oops();
}
diff --git a/zephyr/shim/src/system.c b/zephyr/shim/src/system.c
index 387cedf9ab..ab0847e629 100644
--- a/zephyr/shim/src/system.c
+++ b/zephyr/shim/src/system.c
@@ -335,10 +335,8 @@ static int check_reset_cause(void)
return 0;
}
-test_export_static int system_preinitialize(const struct device *unused)
+test_export_static int system_preinitialize(void)
{
- ARG_UNUSED(unused);
-
if (bbram_dev && !device_is_ready(bbram_dev)) {
LOG_ERR("Error: device %s is not ready", bbram_dev->name);
return -1;
diff --git a/zephyr/shim/src/tasks.c b/zephyr/shim/src/tasks.c
index 2dde7d2610..aa89c9ee5c 100644
--- a/zephyr/shim/src/tasks.c
+++ b/zephyr/shim/src/tasks.c
@@ -393,10 +393,8 @@ void start_ec_tasks(void)
* This allows us to set events on tasks before they even start, e.g. in
* INIT_HOOKS.
*/
-int init_signals(const struct device *unused)
+int init_signals(void)
{
- ARG_UNUSED(unused);
-
for (size_t i = 0; i < TASK_ID_COUNT + EXTRA_TASK_COUNT; ++i) {
struct task_ctx_base_data *const data = task_get_base_data(i);
diff --git a/zephyr/subsys/ap_pwrseq/x86_non_dsx_chipset_power_state.c b/zephyr/subsys/ap_pwrseq/x86_non_dsx_chipset_power_state.c
index a8db0bdefe..58629cab82 100644
--- a/zephyr/subsys/ap_pwrseq/x86_non_dsx_chipset_power_state.c
+++ b/zephyr/subsys/ap_pwrseq/x86_non_dsx_chipset_power_state.c
@@ -173,13 +173,12 @@ static void x86_non_dsx_chipset_state_exit_cb(const struct device *dev,
}
}
-static int x86_non_dsx_chipset_init_events(const struct device *dev)
+static int x86_non_dsx_chipset_init_events(void)
{
static struct ap_pwrseq_state_callback ap_pwrseq_entry_cb;
static struct ap_pwrseq_state_callback ap_pwrseq_exit_cb;
const struct device *ap_pwrseq_dev = ap_pwrseq_get_instance();
- ARG_UNUSED(dev);
power_signal_init();
ap_pwrseq_entry_cb.cb = x86_non_dsx_chipset_state_entry_cb;
diff --git a/zephyr/subsys/ap_pwrseq/x86_non_dsx_common_pwrseq_host_sleep.c b/zephyr/subsys/ap_pwrseq/x86_non_dsx_common_pwrseq_host_sleep.c
index 2e16aba1bb..550e414ed0 100644
--- a/zephyr/subsys/ap_pwrseq/x86_non_dsx_common_pwrseq_host_sleep.c
+++ b/zephyr/subsys/ap_pwrseq/x86_non_dsx_common_pwrseq_host_sleep.c
@@ -173,7 +173,7 @@ static void ap_power_sleep_event_handler(struct ap_power_ev_callback *cb,
/*
* Registers callback for s0ix events.
*/
-static int ap_power_sleep_s0ix_event(const struct device *unused)
+static int ap_power_sleep_s0ix_event(void)
{
static struct ap_power_ev_callback cb;
diff --git a/zephyr/subsys/ap_pwrseq/x86_non_dsx_common_pwrseq_sm_handler.c b/zephyr/subsys/ap_pwrseq/x86_non_dsx_common_pwrseq_sm_handler.c
index 829ac13f73..69b9cc4a8d 100644
--- a/zephyr/subsys/ap_pwrseq/x86_non_dsx_common_pwrseq_sm_handler.c
+++ b/zephyr/subsys/ap_pwrseq/x86_non_dsx_common_pwrseq_sm_handler.c
@@ -731,7 +731,7 @@ static void init_pwr_seq_state(void)
}
/* Initialize power sequence system state */
-static int pwrseq_init(const struct device *dev)
+static int pwrseq_init(void)
{
LOG_INF("Pwrseq Init");
diff --git a/zephyr/subsys/emul/ap_pwrseq/emul_power_signals.c b/zephyr/subsys/emul/ap_pwrseq/emul_power_signals.c
index 9c9a41d601..50a2becf21 100644
--- a/zephyr/subsys/emul/ap_pwrseq/emul_power_signals.c
+++ b/zephyr/subsys/emul/ap_pwrseq/emul_power_signals.c
@@ -576,9 +576,8 @@ int power_signal_emul_unload(void)
*
* @return 0 Return success only.
*/
-static int power_signal_emul_work_q_init(const struct device *dev)
+static int power_signal_emul_work_q_init(void)
{
- ARG_UNUSED(dev);
struct k_work_queue_config cfg = {
.name = "psignal_emul",
.no_yield = true,