drivers: adc: ads7052: 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: #69132

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This commit is contained in:
Henrik Brix Andersen 2024-02-17 16:29:31 +01:00 committed by Maureen Helm
parent 0e321ecc90
commit 4274d1b365
1 changed files with 1 additions and 1 deletions

View File

@ -275,7 +275,7 @@ static int adc_ads7052_init(const struct device *dev)
}
k_thread_create(&data->thread, data->stack,
CONFIG_ADC_ADS7052_ACQUISITION_THREAD_STACK_SIZE,
K_KERNEL_STACK_SIZEOF(data->stack),
ads7052_acquisition_thread, data, NULL, NULL,
CONFIG_ADC_ADS7052_ACQUISITION_THREAD_PRIO, 0, K_NO_WAIT);