mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-11-30 07:29:42 -05:00
pinctrl: rk805: Make structures constant
Static structures rk805_pinctrl_desc and rk805_gpio_chip, of types gpio_chip and pinctrl_desc respectively, are not used except to be copied into the fields of a different variable. Hence make rk805_pinctrl_desc and rk805_gpio_chip both constant to protect them from unintended modification. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
This commit is contained in:
parent
a4873accca
commit
6e28aaab07
1 changed files with 2 additions and 2 deletions
|
|
@ -197,7 +197,7 @@ static int rk805_gpio_get_direction(struct gpio_chip *chip, unsigned int offset)
|
|||
return !(val & pci->pin_cfg[offset].dir_msk);
|
||||
}
|
||||
|
||||
static struct gpio_chip rk805_gpio_chip = {
|
||||
static const struct gpio_chip rk805_gpio_chip = {
|
||||
.label = "rk805-gpio",
|
||||
.request = gpiochip_generic_request,
|
||||
.free = gpiochip_generic_free,
|
||||
|
|
@ -404,7 +404,7 @@ static const struct pinconf_ops rk805_pinconf_ops = {
|
|||
.pin_config_set = rk805_pinconf_set,
|
||||
};
|
||||
|
||||
static struct pinctrl_desc rk805_pinctrl_desc = {
|
||||
static const struct pinctrl_desc rk805_pinctrl_desc = {
|
||||
.name = "rk805-pinctrl",
|
||||
.pctlops = &rk805_pinctrl_ops,
|
||||
.pmxops = &rk805_pinmux_ops,
|
||||
|
|
|
|||
Loading…
Reference in a new issue