pinctrl: renesas: Constify sh73a0_vccq_mc0_ops
Subsystems (3)
PATCH 1/1 pinctrl: renesas: Constify sh73a0_vccq_mc0_ops
The only usage of sh73a0_vccq_mc0_ops is to assign its address to the ops field in the regulator_desc struct, which is a const pointer. Make it const to allow the compiler to put it in read-only memory.
Signed-off-by Rikard Falkeborn <[email protected]>
--- drivers/pinctrl/renesas/pfc-sh73a0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/renesas/pfc-sh73a0.c +1 -1
@@ -4279,7 +4279,7 @@ static int sh73a0_vccq_mc0_get_voltage(struct regulator_dev *reg)return 3300000 ; } -static struct regulator_ops sh73a0_vccq_mc0_ops = { +static const struct regulator_ops sh73a0_vccq_mc0_ops = { .enable = sh73a0_vccq_mc0_enable, .disable = sh73a0_vccq_mc0_disable, .is_enabled = sh73a0_vccq_mc0_is_enabled,
Signature · 1 line
2.29.2
Quoted 5 lines · Rikard Falkeborn
The only usage of
sh73a0_vccq_mc0_opsis to assign its address to the ops field in theregulator_descstruct, which is a const pointer. Make it const to allow the compiler to put it in read-only memory.Signed-off-by Rikard Falkeborn <[email protected]>
Reviewed-by Geert Uytterhoeven <[email protected]>
i.e. will queue in renesas-pinctrl-for-v5.11.
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds