From c08b66cfeebfe6faf2171fad0bcbebece5bc838d Mon Sep 17 00:00:00 2001 From: Benedikt Schmidt Date: Thu, 8 Feb 2024 17:08:43 +0100 Subject: [PATCH] drivers: adc: set name for acquisition thread of MCP320x Set the name of the acquisition thread for the ADC MCP320x. Signed-off-by: Benedikt Schmidt --- drivers/adc/adc_mcp320x.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/adc/adc_mcp320x.c b/drivers/adc/adc_mcp320x.c index 71ba54bd3af..7fc0e421fd8 100644 --- a/drivers/adc/adc_mcp320x.c +++ b/drivers/adc/adc_mcp320x.c @@ -283,13 +283,15 @@ static int mcp320x_init(const struct device *dev) return -ENODEV; } - k_thread_create(&data->thread, data->stack, + k_tid_t tid = k_thread_create(&data->thread, data->stack, K_KERNEL_STACK_SIZEOF(data->stack), mcp320x_acquisition_thread, data, NULL, NULL, CONFIG_ADC_MCP320X_ACQUISITION_THREAD_PRIO, 0, K_NO_WAIT); + k_thread_name_set(tid, dev->name); + adc_context_unlock_unconditionally(&data->ctx); return 0;