projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0192fff
)
pinctrl: adi2: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures
author
Julia Lawall
<Julia.Lawall@lip6.fr>
Thu, 10 Aug 2017 10:06:22 +0000
(12:06 +0200)
committer
Linus Walleij
<linus.walleij@linaro.org>
Tue, 22 Aug 2017 12:40:45 +0000
(14:40 +0200)
These structures are only stored in fields of a pinctrl_desc
structure (pctlops and pmxops) that are const. Make the
structures const as well.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinctrl-adi2.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/pinctrl/pinctrl-adi2.c
b/drivers/pinctrl/pinctrl-adi2.c
index 54569a7eac59179a42495b3a140fa5fa261ab438..56aa181084ac9acc01b2b3689c9019fa921970bb 100644
(file)
--- a/
drivers/pinctrl/pinctrl-adi2.c
+++ b/
drivers/pinctrl/pinctrl-adi2.c
@@
-612,7
+612,7
@@
static int adi_get_group_pins(struct pinctrl_dev *pctldev, unsigned selector,
return 0;
}
-static struct pinctrl_ops adi_pctrl_ops = {
+static
const
struct pinctrl_ops adi_pctrl_ops = {
.get_groups_count = adi_get_groups_count,
.get_group_name = adi_get_group_name,
.get_group_pins = adi_get_group_pins,
@@
-696,7
+696,7
@@
static int adi_pinmux_request_gpio(struct pinctrl_dev *pctldev,
return 0;
}
-static struct pinmux_ops adi_pinmux_ops = {
+static
const
struct pinmux_ops adi_pinmux_ops = {
.set_mux = adi_pinmux_set,
.get_functions_count = adi_pinmux_get_funcs_count,
.get_function_name = adi_pinmux_get_func_name,