drivers: adc: max1125x: use K_KERNEL_STACK_SIZEOF()

Use K_KERNEL_STACK_SIZEOF() for calculating thread stack size, as this
takes K_KERNEL_STACK_RESERVED into account.

Fixes: #69129

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This commit is contained in:
Henrik Brix Andersen 2024-02-17 16:34:14 +01:00 committed by Maureen Helm
parent ad85283906
commit 79d5857e9f

View File

@ -755,7 +755,7 @@ static int max1125x_init(const struct device *dev)
}
k_tid_t tid = k_thread_create(
&data->thread, data->stack, K_THREAD_STACK_SIZEOF(data->stack),
&data->thread, data->stack, K_KERNEL_STACK_SIZEOF(data->stack),
max1125x_acquisition_thread, (void *)dev, NULL, NULL,
CONFIG_ADC_MAX1125X_ACQUISITION_THREAD_PRIORITY, 0, K_NO_WAIT);
k_thread_name_set(tid, "adc_max1125x");