forked from Minki/linux
pinctrl: bcm: Constify static pinctrl_ops
These are only assigned, either directly or via the bcm63xx_pinctrl_soc struct, to the pctlops 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 <rikard.falkeborn@gmail.com> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Link: https://lore.kernel.org/r/20210605185908.39982-2-rikard.falkeborn@gmail.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
a49a8717d8
commit
d977909367
@ -452,7 +452,7 @@ static int bcm6318_gpio_request_enable(struct pinctrl_dev *pctldev,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct pinctrl_ops bcm6318_pctl_ops = {
|
||||
static const struct pinctrl_ops bcm6318_pctl_ops = {
|
||||
.dt_free_map = pinctrl_utils_free_map,
|
||||
.dt_node_to_map = pinconf_generic_dt_node_to_map_pin,
|
||||
.get_group_name = bcm6318_pinctrl_get_group_name,
|
||||
|
@ -597,7 +597,7 @@ static int bcm63268_gpio_request_enable(struct pinctrl_dev *pctldev,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct pinctrl_ops bcm63268_pctl_ops = {
|
||||
static const struct pinctrl_ops bcm63268_pctl_ops = {
|
||||
.dt_free_map = pinctrl_utils_free_map,
|
||||
.dt_node_to_map = pinconf_generic_dt_node_to_map_pin,
|
||||
.get_group_name = bcm63268_pinctrl_get_group_name,
|
||||
|
@ -358,7 +358,7 @@ static int bcm6328_gpio_request_enable(struct pinctrl_dev *pctldev,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct pinctrl_ops bcm6328_pctl_ops = {
|
||||
static const struct pinctrl_ops bcm6328_pctl_ops = {
|
||||
.dt_free_map = pinctrl_utils_free_map,
|
||||
.dt_node_to_map = pinconf_generic_dt_node_to_map_pin,
|
||||
.get_group_name = bcm6328_pinctrl_get_group_name,
|
||||
|
@ -303,7 +303,7 @@ static int bcm6358_gpio_request_enable(struct pinctrl_dev *pctldev,
|
||||
return regmap_field_update_bits(priv->overlays, mask, 0);
|
||||
}
|
||||
|
||||
static struct pinctrl_ops bcm6358_pctl_ops = {
|
||||
static const struct pinctrl_ops bcm6358_pctl_ops = {
|
||||
.dt_free_map = pinctrl_utils_free_map,
|
||||
.dt_node_to_map = pinconf_generic_dt_node_to_map_pin,
|
||||
.get_group_name = bcm6358_pinctrl_get_group_name,
|
||||
|
@ -571,7 +571,7 @@ static int bcm6362_gpio_request_enable(struct pinctrl_dev *pctldev,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct pinctrl_ops bcm6362_pctl_ops = {
|
||||
static const struct pinctrl_ops bcm6362_pctl_ops = {
|
||||
.dt_free_map = pinctrl_utils_free_map,
|
||||
.dt_node_to_map = pinconf_generic_dt_node_to_map_pin,
|
||||
.get_group_name = bcm6362_pinctrl_get_group_name,
|
||||
|
@ -457,7 +457,7 @@ static int bcm6368_gpio_request_enable(struct pinctrl_dev *pctldev,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct pinctrl_ops bcm6368_pctl_ops = {
|
||||
static const struct pinctrl_ops bcm6368_pctl_ops = {
|
||||
.dt_free_map = pinctrl_utils_free_map,
|
||||
.dt_node_to_map = pinconf_generic_dt_node_to_map_pin,
|
||||
.get_group_name = bcm6368_pinctrl_get_group_name,
|
||||
|
@ -12,7 +12,7 @@
|
||||
#define BCM63XX_BANK_GPIOS 32
|
||||
|
||||
struct bcm63xx_pinctrl_soc {
|
||||
struct pinctrl_ops *pctl_ops;
|
||||
const struct pinctrl_ops *pctl_ops;
|
||||
struct pinmux_ops *pmx_ops;
|
||||
|
||||
const struct pinctrl_pin_desc *pins;
|
||||
|
Loading…
Reference in New Issue
Block a user