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 <benedikt.schmidt@embedded-solutions.at>
This commit is contained in:
Benedikt Schmidt 2024-02-08 17:08:43 +01:00 committed by Fabio Baltieri
parent 35502592a7
commit c08b66cfee
1 changed files with 3 additions and 1 deletions

View File

@ -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;