]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
iio: adc: stm32-adc: make stm32_adc_trig_info const
authorDavid Lechner <dlechner@baylibre.com>
Sat, 28 Jun 2025 16:39:33 +0000 (11:39 -0500)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 6 Jul 2025 09:37:52 +0000 (10:37 +0100)
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>
drivers/iio/adc/stm32-adc.c

index 588c69e175f5129030eef9ebfe0eabb6412b1893..b9f93116e114b1c840cbe568f17462b2d25bf2db 100644 (file)
@@ -216,7 +216,7 @@ struct stm32_adc;
 struct stm32_adc_cfg {
        const struct stm32_adc_regspec  *regs;
        const struct stm32_adc_info     *adc_info;
-       struct stm32_adc_trig_info      *trigs;
+       const struct stm32_adc_trig_info *trigs;
        bool clk_required;
        bool has_vregready;
        bool has_boostmode;
@@ -383,7 +383,7 @@ static const struct stm32_adc_regs stm32f4_sq[STM32_ADC_MAX_SQ + 1] = {
 };
 
 /* STM32F4 external trigger sources for all instances */
-static struct stm32_adc_trig_info stm32f4_adc_trigs[] = {
+static const struct stm32_adc_trig_info stm32f4_adc_trigs[] = {
        { TIM1_CH1, STM32_EXT0 },
        { TIM1_CH2, STM32_EXT1 },
        { TIM1_CH3, STM32_EXT2 },
@@ -473,7 +473,7 @@ static const struct stm32_adc_regs stm32h7_sq[STM32_ADC_MAX_SQ + 1] = {
 };
 
 /* STM32H7 external trigger sources for all instances */
-static struct stm32_adc_trig_info stm32h7_adc_trigs[] = {
+static const struct stm32_adc_trig_info stm32h7_adc_trigs[] = {
        { TIM1_CH1, STM32_EXT0 },
        { TIM1_CH2, STM32_EXT1 },
        { TIM1_CH3, STM32_EXT2 },