pinctrl: stm32: Constify static 'pinctrl_desc'
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Mon, 18 Aug 2025 14:24:03 +0000 (16:24 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 20 Aug 2025 07:13:34 +0000 (09:13 +0200)
The local static 'struct pinctrl_desc' is not modified, so can be made
const for code safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/20250818142402.132008-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/stm32/pinctrl-stm32-hdp.c

index dea49b9..a8a4c2e 100644 (file)
@@ -576,7 +576,7 @@ static const struct pinmux_ops stm32_hdp_pinmux_ops = {
        .gpio_set_direction  = NULL,
 };
 
-static struct pinctrl_desc stm32_hdp_pdesc = {
+static const struct pinctrl_desc stm32_hdp_pdesc = {
        .name    = DRIVER_NAME,
        .pins    = stm32_hdp_pins,
        .npins   = ARRAY_SIZE(stm32_hdp_pins),