Skip to content

Commit

Permalink
drivers: adc: Fix misuse of const and k_tid_t
Browse files Browse the repository at this point in the history
"const k_tid_t" is "struct k_thread * const" and not "const struct
k_thread *" as the code may be assuming. Just drop it.

Signed-off-by: Flavio Ceolin <[email protected]>
  • Loading branch information
Flavio Ceolin authored and carlescufi committed Oct 23, 2023
1 parent 64058f8 commit b483c92
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion drivers/adc/adc_ads1119.c
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ static int ads1119_init(const struct device *dev)
}

#if CONFIG_ADC_ASYNC
const k_tid_t tid =
k_tid_t tid =
k_thread_create(&data->thread, config->stack,
CONFIG_ADC_ADS1119_ACQUISITION_THREAD_STACK_SIZE,
(k_thread_entry_t)ads1119_acquisition_thread,
Expand Down
2 changes: 1 addition & 1 deletion drivers/adc/adc_ads114s0x.c
Original file line number Diff line number Diff line change
Expand Up @@ -1352,7 +1352,7 @@ static int ads114s0x_init(const struct device *dev)
}

#if CONFIG_ADC_ASYNC
const k_tid_t tid = k_thread_create(
k_tid_t tid = k_thread_create(
&data->thread, config->stack, CONFIG_ADC_ADS114S0X_ACQUISITION_THREAD_STACK_SIZE,
(k_thread_entry_t)ads114s0x_acquisition_thread, (void *)dev, NULL, NULL,
CONFIG_ADC_ADS114S0X_ASYNC_THREAD_INIT_PRIO, 0, K_NO_WAIT);
Expand Down
2 changes: 1 addition & 1 deletion drivers/adc/adc_ads1x1x.c
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ static int ads1x1x_init(const struct device *dev)
return -ENODEV;
}

const k_tid_t tid =
k_tid_t tid =
k_thread_create(&data->thread, data->stack, K_THREAD_STACK_SIZEOF(data->stack),
(k_thread_entry_t)ads1x1x_acquisition_thread, (void *)dev, NULL,
NULL, CONFIG_ADC_ADS1X1X_ACQUISITION_THREAD_PRIO, 0, K_NO_WAIT);
Expand Down
2 changes: 1 addition & 1 deletion drivers/adc/adc_max11102_17.c
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ static int max11102_17_init(const struct device *dev)
data->current_channel_id = 0;

#if CONFIG_ADC_ASYNC
const k_tid_t tid = k_thread_create(
k_tid_t tid = k_thread_create(
&data->thread, data->stack, CONFIG_ADC_MAX11102_17_ACQUISITION_THREAD_STACK_SIZE,
(k_thread_entry_t)max11102_17_acquisition_thread, (void *)dev, NULL, NULL,
CONFIG_ADC_MAX11102_17_ACQUISITION_THREAD_INIT_PRIO, 0, K_NO_WAIT);
Expand Down
2 changes: 1 addition & 1 deletion drivers/adc/adc_max1125x.c
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ static int max1125x_init(const struct device *dev)
return -EIO;
}

const k_tid_t tid = k_thread_create(
k_tid_t tid = k_thread_create(
&data->thread, data->stack, K_THREAD_STACK_SIZEOF(data->stack),
(k_thread_entry_t)max1125x_acquisition_thread, (void *)dev, NULL, NULL,
CONFIG_ADC_MAX1125X_ACQUISITION_THREAD_PRIORITY, 0, K_NO_WAIT);
Expand Down

0 comments on commit b483c92

Please sign in to comment.