Skip to content

Commit ae81429

Browse files
henrikbrixandersenMaureenHelm
authored andcommitted
drivers: adc: mcp320x: 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: #69130 Signed-off-by: Henrik Brix Andersen <[email protected]>
1 parent 32939fa commit ae81429

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/adc/adc_mcp320x.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ static int mcp320x_init(const struct device *dev)
284284
}
285285

286286
k_thread_create(&data->thread, data->stack,
287-
CONFIG_ADC_MCP320X_ACQUISITION_THREAD_STACK_SIZE,
287+
K_KERNEL_STACK_SIZEOF(data->stack),
288288
mcp320x_acquisition_thread,
289289
data, NULL, NULL,
290290
CONFIG_ADC_MCP320X_ACQUISITION_THREAD_PRIO,

0 commit comments

Comments
 (0)