Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

David Lechner and committed by
Jonathan Cameron
0084ccd7 89b97105

+3 -3
+3 -3
drivers/iio/adc/stm32-adc.c
··· 216 216 struct stm32_adc_cfg { 217 217 const struct stm32_adc_regspec *regs; 218 218 const struct stm32_adc_info *adc_info; 219 - struct stm32_adc_trig_info *trigs; 219 + const struct stm32_adc_trig_info *trigs; 220 220 bool clk_required; 221 221 bool has_vregready; 222 222 bool has_boostmode; ··· 383 383 }; 384 384 385 385 /* 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[] = { 387 387 { TIM1_CH1, STM32_EXT0 }, 388 388 { TIM1_CH2, STM32_EXT1 }, 389 389 { TIM1_CH3, STM32_EXT2 }, ··· 473 473 }; 474 474 475 475 /* 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[] = { 477 477 { TIM1_CH1, STM32_EXT0 }, 478 478 { TIM1_CH2, STM32_EXT1 }, 479 479 { TIM1_CH3, STM32_EXT2 },