diff options
author | Julia Lawall <Julia.Lawall@lip6.fr> | 2016-09-01 20:42:20 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2016-09-07 22:40:40 +0200 |
commit | c87da270c11fcf995fb0bc7248e446821b32f573 (patch) | |
tree | fdd37e0501e9bcd9afaf83bc3c300c6e0cfd7d58 /drivers/watchdog/octeon-wdt-main.c | |
parent | pinctrl: ns2: constify pinctrl_ops and pinmux_ops structures (diff) | |
download | linux-c87da270c11fcf995fb0bc7248e446821b32f573.tar.xz linux-c87da270c11fcf995fb0bc7248e446821b32f573.zip |
pinctrl: nsp: constify pinctrl_ops and pinmux_ops structures
Check for pinctrl_ops and pinmux_ops structures that are only stored in the
pctlops field and the pmxops field, respectively, of a pinctrl_desc
structure. These fields are declared const, so pinctrl_ops and pinmux_ops
structures that have this property can be declared as const also.
The semantic patch that makes this change in the pinctrl_ops is as
follows. The pinmux_ops case is similar. (http://coccinelle.lip6.fr/)
// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct pinctrl_ops i@p = { ... };
@ok@
identifier r.i;
struct pinctrl_desc e;
position p;
@@
e.pctlops = &i@p;
@bad@
position p != {r.p,ok.p};
identifier r.i;
struct pinctrl_ops e;
@@
e@i@p
@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct pinctrl_ops i = { ... };
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/watchdog/octeon-wdt-main.c')
0 files changed, 0 insertions, 0 deletions