Julia Lawall c87da270c1 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>
2016-09-07 22:40:40 +02:00
..
2016-08-05 23:29:05 -04:00
2016-07-27 14:03:52 -07:00
2016-08-07 14:41:02 -06:00
2016-08-01 18:36:01 -04:00
2016-08-05 09:48:22 -04:00
2016-07-30 21:01:36 -07:00
2016-07-28 15:45:17 -07:00
2016-08-01 16:49:13 -04:00
2016-07-30 21:01:36 -07:00
2016-07-30 21:01:36 -07:00
2016-07-30 21:01:36 -07:00
2016-08-07 14:41:02 -06:00
2016-08-04 09:59:37 -04:00
2016-08-02 17:05:11 -04:00
2016-08-01 18:36:01 -04:00
2016-08-06 09:20:13 -04:00
2016-07-31 21:36:58 -04:00
2016-08-06 09:20:13 -04:00
2016-07-20 23:39:36 -07:00
2016-08-07 14:41:02 -06:00
2016-07-31 21:36:58 -04:00
2016-08-06 00:01:33 -04:00
2016-08-01 18:36:01 -04:00
2016-08-06 00:01:33 -04:00
2016-08-06 00:01:33 -04:00
2016-08-05 09:48:22 -04:00
2016-08-05 23:47:27 -04:00
2016-08-01 18:36:01 -04:00
2016-08-01 18:37:45 -04:00
2016-08-05 23:07:43 -04:00
2016-08-06 09:20:13 -04:00
2016-08-06 09:20:13 -04:00
2016-08-02 19:35:40 -04:00
2016-08-06 09:20:13 -04:00