Skip to content

Commit 0c68387

Browse files
rikardfalkebornlinusw
authored andcommitted
pinctrl: bcm: Constify static pinmux_ops
These are only assigned, either directly or via the bcm63xx_pinctrl_soc struct, to the pmxops field in the pinctrl_desc struct and never modified, so make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn <[email protected]> Acked-by: Florian Fainelli <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
1 parent d977909 commit 0c68387

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

drivers/pinctrl/bcm/pinctrl-bcm6318.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ static const struct pinctrl_ops bcm6318_pctl_ops = {
460460
.get_groups_count = bcm6318_pinctrl_get_group_count,
461461
};
462462

463-
static struct pinmux_ops bcm6318_pmx_ops = {
463+
static const struct pinmux_ops bcm6318_pmx_ops = {
464464
.get_function_groups = bcm6318_pinctrl_get_groups,
465465
.get_function_name = bcm6318_pinctrl_get_func_name,
466466
.get_functions_count = bcm6318_pinctrl_get_func_count,

drivers/pinctrl/bcm/pinctrl-bcm63268.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ static const struct pinctrl_ops bcm63268_pctl_ops = {
605605
.get_groups_count = bcm63268_pinctrl_get_group_count,
606606
};
607607

608-
static struct pinmux_ops bcm63268_pmx_ops = {
608+
static const struct pinmux_ops bcm63268_pmx_ops = {
609609
.get_function_groups = bcm63268_pinctrl_get_groups,
610610
.get_function_name = bcm63268_pinctrl_get_func_name,
611611
.get_functions_count = bcm63268_pinctrl_get_func_count,

drivers/pinctrl/bcm/pinctrl-bcm6328.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ static const struct pinctrl_ops bcm6328_pctl_ops = {
366366
.get_groups_count = bcm6328_pinctrl_get_group_count,
367367
};
368368

369-
static struct pinmux_ops bcm6328_pmx_ops = {
369+
static const struct pinmux_ops bcm6328_pmx_ops = {
370370
.get_function_groups = bcm6328_pinctrl_get_groups,
371371
.get_function_name = bcm6328_pinctrl_get_func_name,
372372
.get_functions_count = bcm6328_pinctrl_get_func_count,

drivers/pinctrl/bcm/pinctrl-bcm6358.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ static const struct pinctrl_ops bcm6358_pctl_ops = {
311311
.get_groups_count = bcm6358_pinctrl_get_group_count,
312312
};
313313

314-
static struct pinmux_ops bcm6358_pmx_ops = {
314+
static const struct pinmux_ops bcm6358_pmx_ops = {
315315
.get_function_groups = bcm6358_pinctrl_get_groups,
316316
.get_function_name = bcm6358_pinctrl_get_func_name,
317317
.get_functions_count = bcm6358_pinctrl_get_func_count,

drivers/pinctrl/bcm/pinctrl-bcm6362.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ static const struct pinctrl_ops bcm6362_pctl_ops = {
579579
.get_groups_count = bcm6362_pinctrl_get_group_count,
580580
};
581581

582-
static struct pinmux_ops bcm6362_pmx_ops = {
582+
static const struct pinmux_ops bcm6362_pmx_ops = {
583583
.get_function_groups = bcm6362_pinctrl_get_groups,
584584
.get_function_name = bcm6362_pinctrl_get_func_name,
585585
.get_functions_count = bcm6362_pinctrl_get_func_count,

drivers/pinctrl/bcm/pinctrl-bcm6368.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ static const struct pinctrl_ops bcm6368_pctl_ops = {
465465
.get_groups_count = bcm6368_pinctrl_get_group_count,
466466
};
467467

468-
static struct pinmux_ops bcm6368_pmx_ops = {
468+
static const struct pinmux_ops bcm6368_pmx_ops = {
469469
.get_function_groups = bcm6368_pinctrl_get_groups,
470470
.get_function_name = bcm6368_pinctrl_get_func_name,
471471
.get_functions_count = bcm6368_pinctrl_get_func_count,

drivers/pinctrl/bcm/pinctrl-bcm63xx.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
struct bcm63xx_pinctrl_soc {
1515
const struct pinctrl_ops *pctl_ops;
16-
struct pinmux_ops *pmx_ops;
16+
const struct pinmux_ops *pmx_ops;
1717

1818
const struct pinctrl_pin_desc *pins;
1919
unsigned npins;

0 commit comments

Comments
 (0)