Skip to content

Commit 7b7fac9

Browse files
dlechjic23
authored andcommitted
iio: adc: stm32-adc: make stm32_adc_trig_info const
Add const qualifier to struct stm32_adc_trig_info. This is read-only data so it can be made const. Signed-off-by: David Lechner <dlechner@baylibre.com> Link: https://patch.msgid.link/20250628-iio-const-data-10-v1-1-0ba93ac792c8@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
1 parent 301ab52 commit 7b7fac9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/iio/adc/stm32-adc.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ struct stm32_adc;
216216
struct stm32_adc_cfg {
217217
const struct stm32_adc_regspec *regs;
218218
const struct stm32_adc_info *adc_info;
219-
struct stm32_adc_trig_info *trigs;
219+
const struct stm32_adc_trig_info *trigs;
220220
bool clk_required;
221221
bool has_vregready;
222222
bool has_boostmode;
@@ -383,7 +383,7 @@ static const struct stm32_adc_regs stm32f4_sq[STM32_ADC_MAX_SQ + 1] = {
383383
};
384384

385385
/* STM32F4 external trigger sources for all instances */
386-
static struct stm32_adc_trig_info stm32f4_adc_trigs[] = {
386+
static const struct stm32_adc_trig_info stm32f4_adc_trigs[] = {
387387
{ TIM1_CH1, STM32_EXT0 },
388388
{ TIM1_CH2, STM32_EXT1 },
389389
{ TIM1_CH3, STM32_EXT2 },
@@ -473,7 +473,7 @@ static const struct stm32_adc_regs stm32h7_sq[STM32_ADC_MAX_SQ + 1] = {
473473
};
474474

475475
/* STM32H7 external trigger sources for all instances */
476-
static struct stm32_adc_trig_info stm32h7_adc_trigs[] = {
476+
static const struct stm32_adc_trig_info stm32h7_adc_trigs[] = {
477477
{ TIM1_CH1, STM32_EXT0 },
478478
{ TIM1_CH2, STM32_EXT1 },
479479
{ TIM1_CH3, STM32_EXT2 },

0 commit comments

Comments
 (0)