From 66a06d955a36ce5f9cd31ffb97b941820a250edf Mon Sep 17 00:00:00 2001 From: Fabio Baltieri Date: Thu, 21 Dec 2023 18:55:04 +0000 Subject: [PATCH] input: use K_KERNEL_STACK_SIZEOF to set the thread stack size Use K_KERNEL_STACK_SIZEOF instead of the config directly to set the stack size in k_thread_create() calls. Signed-off-by: Fabio Baltieri --- drivers/input/input_kbd_matrix.c | 2 +- drivers/input/linux_evdev.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/input/input_kbd_matrix.c b/drivers/input/input_kbd_matrix.c index 39bebf5c49..6cbba73d9d 100644 --- a/drivers/input/input_kbd_matrix.c +++ b/drivers/input/input_kbd_matrix.c @@ -315,7 +315,7 @@ int input_kbd_matrix_common_init(const struct device *dev) k_sem_init(&data->poll_lock, 0, 1); k_thread_create(&data->thread, data->thread_stack, - CONFIG_INPUT_KBD_MATRIX_THREAD_STACK_SIZE, + K_KERNEL_STACK_SIZEOF(data->thread_stack), input_kbd_matrix_polling_thread, (void *)dev, NULL, NULL, CONFIG_INPUT_KBD_MATRIX_THREAD_PRIORITY, 0, K_NO_WAIT); diff --git a/drivers/input/linux_evdev.c b/drivers/input/linux_evdev.c index 20ba7419b1..55d412d567 100644 --- a/drivers/input/linux_evdev.c +++ b/drivers/input/linux_evdev.c @@ -98,7 +98,7 @@ static int linux_evdev_init(const struct device *dev) linux_evdev_fd = linux_evdev_open(linux_evdev_path); k_thread_create(&linux_evdev_thread, linux_evdev_thread_stack, - CONFIG_ARCH_POSIX_RECOMMENDED_STACK_SIZE, + K_KERNEL_STACK_SIZEOF(linux_evdev_thread_stack), linux_evdev_thread_fn, (void *)dev, NULL, NULL, CONFIG_NATIVE_LINUX_EVDEV_THREAD_PRIORITY, 0, K_NO_WAIT);