diff options
author | Russell King <rmk+kernel@armlinux.org.uk> | 2017-01-13 11:03:15 +0000 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2017-01-18 09:53:25 +0100 |
commit | 30be3fb9b89c1c606a6ed35ca437426f620ae4f6 (patch) | |
tree | 57dfbc73fee8312b08e56872a3788afbaa22b129 /drivers/pinctrl/mvebu/pinctrl-mvebu.c | |
parent | a61266ebdf2c412df6fe2c81e74cb67b719915d5 (diff) | |
download | op-kernel-dev-30be3fb9b89c1c606a6ed35ca437426f620ae4f6.zip op-kernel-dev-30be3fb9b89c1c606a6ed35ca437426f620ae4f6.tar.gz |
pinctrl: mvebu: constify mvebu_mpp_ctrl structures
As the mvebu_mpp_ctrl structures contain function pointers, it is
preferable for these to be made read-only to prevent the function
pointers being modified. So make these const.
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/mvebu/pinctrl-mvebu.c')
-rw-r--r-- | drivers/pinctrl/mvebu/pinctrl-mvebu.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/pinctrl/mvebu/pinctrl-mvebu.c b/drivers/pinctrl/mvebu/pinctrl-mvebu.c index ff314aa..3019ec7 100644 --- a/drivers/pinctrl/mvebu/pinctrl-mvebu.c +++ b/drivers/pinctrl/mvebu/pinctrl-mvebu.c @@ -38,7 +38,7 @@ struct mvebu_pinctrl_function { struct mvebu_pinctrl_group { const char *name; - struct mvebu_mpp_ctrl *ctrl; + const struct mvebu_mpp_ctrl *ctrl; struct mvebu_mpp_ctrl_setting *settings; unsigned num_settings; unsigned gid; @@ -576,7 +576,7 @@ int mvebu_pinctrl_probe(struct platform_device *pdev) pctl->num_groups = 0; pctl->desc.npins = 0; for (n = 0; n < soc->ncontrols; n++) { - struct mvebu_mpp_ctrl *ctrl = &soc->controls[n]; + const struct mvebu_mpp_ctrl *ctrl = &soc->controls[n]; pctl->desc.npins += ctrl->npins; /* initialize control's pins[] array */ @@ -620,7 +620,7 @@ int mvebu_pinctrl_probe(struct platform_device *pdev) /* assign mpp controls to groups */ gid = 0; for (n = 0; n < soc->ncontrols; n++) { - struct mvebu_mpp_ctrl *ctrl = &soc->controls[n]; + const struct mvebu_mpp_ctrl *ctrl = &soc->controls[n]; pctl->groups[gid].gid = gid; pctl->groups[gid].ctrl = ctrl; pctl->groups[gid].name = ctrl->name; |