Skip to content

Commit 8e2f830

Browse files
rikardfalkebornLinus Walleij
authored andcommitted
pinctrl: actions: pinctrl-owl: Constify owl_pinctrl_ops and owl_pinmux_ops
The only usage of owl_pinctrl_ops and owl_pinmux_ops is to assign their addresses to the pctlops and the pmxops fields in the pinctrl_desc struct, which are const pointers. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Link: https://lore.kernel.org/r/20200830224311.36994-2-rikard.falkeborn@gmail.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
1 parent b9b7fb2 commit 8e2f830

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎drivers/pinctrl/actions/pinctrl-owl.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ static void owl_pin_dbg_show(struct pinctrl_dev *pctrldev,
125125
seq_printf(s, "%s", dev_name(pctrl->dev));
126126
}
127127

128-
static struct pinctrl_ops owl_pinctrl_ops = {
128+
static const struct pinctrl_ops owl_pinctrl_ops = {
129129
.get_groups_count = owl_get_groups_count,
130130
.get_group_name = owl_get_group_name,
131131
.get_group_pins = owl_get_group_pins,
@@ -212,7 +212,7 @@ static int owl_set_mux(struct pinctrl_dev *pctrldev,
212212
return 0;
213213
}
214214

215-
static struct pinmux_ops owl_pinmux_ops = {
215+
static const struct pinmux_ops owl_pinmux_ops = {
216216
.get_functions_count = owl_get_funcs_count,
217217
.get_function_name = owl_get_func_name,
218218
.get_function_groups = owl_get_func_groups,

0 commit comments

Comments
 (0)