alistair23-linux/drivers/pinctrl/bcm
Julia Lawall 5fe2501fbf pinctrl: bcm281xx: 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>
2016-09-07 22:41:30 +02:00
..
Kconfig pinctrl: bcm: add OF dependencies 2016-07-22 16:43:32 +02:00
Makefile pinctrl: nsp: add pinmux driver support for Broadcom NSP SoC 2016-06-29 10:06:00 +02:00
pinctrl-bcm281xx.c pinctrl: bcm281xx: constify pinctrl_ops and pinmux_ops structures 2016-09-07 22:41:30 +02:00
pinctrl-bcm2835.c pinctrl: bcm2835: Use devm_pinctrl_register() for pinctrl registration 2016-04-21 00:01:56 +02:00
pinctrl-cygnus-mux.c pinctrl: cygnus-mux: Use devm_pinctrl_register() for pinctrl registration 2016-04-21 00:02:00 +02:00
pinctrl-iproc-gpio.c pinctrl: iproc: Add NSP and Stingray GPIO support 2016-07-22 16:47:51 +02:00
pinctrl-ns2-mux.c pinctrl: ns2: constify pinctrl_ops and pinmux_ops structures 2016-09-07 22:39:44 +02:00
pinctrl-nsp-gpio.c pinctrl: nsp-gpio: fix non-static functions 2016-06-08 14:09:49 +02:00
pinctrl-nsp-mux.c pinctrl: nsp: constify pinctrl_ops and pinmux_ops structures 2016-09-07 22:40:40 +02:00