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

pinctrl: st: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures

These structures are only stored in fields of a pinctrl_desc
structure (confops, pctlops, and pmxops) that are const. Make the
structures const as well.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Julia Lawall and committed by
Linus Walleij
baf918c4 9b4e2ba4

+3 -3
+3 -3
drivers/pinctrl/pinctrl-st.c
··· 861 861 { 862 862 } 863 863 864 - static struct pinctrl_ops st_pctlops = { 864 + static const struct pinctrl_ops st_pctlops = { 865 865 .get_groups_count = st_pctl_get_groups_count, 866 866 .get_group_pins = st_pctl_get_group_pins, 867 867 .get_group_name = st_pctl_get_group_name, ··· 928 928 return 0; 929 929 } 930 930 931 - static struct pinmux_ops st_pmxops = { 931 + static const struct pinmux_ops st_pmxops = { 932 932 .get_functions_count = st_pmx_get_funcs_count, 933 933 .get_function_name = st_pmx_get_fname, 934 934 .get_function_groups = st_pmx_get_groups, ··· 1025 1025 ST_PINCONF_UNPACK_RT_DELAY(config)); 1026 1026 } 1027 1027 1028 - static struct pinconf_ops st_confops = { 1028 + static const struct pinconf_ops st_confops = { 1029 1029 .pin_config_get = st_pinconf_get, 1030 1030 .pin_config_set = st_pinconf_set, 1031 1031 .pin_config_dbg_show = st_pinconf_dbg_show,