Julia Lawall f802d6c020 ASoC: constify snd_soc_codec_driver structures
Check for snd_soc_codec_driver structures that are only passed to
snd_soc_register_codec or memcpy (2nd arg), for which the corresponding
parameters are declared const.  Declare as const snd_soc_codec_driver
structures that have these properties.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct snd_soc_codec_driver i@p = { ... };

@ok@
identifier r.i;
expression e1,e2,e3;
position p;
@@
(
snd_soc_register_codec(e1,&i@p,e2,e3)
|
memcpy(e1,&i@p,e2)
)

@bad@
position p != {r.p,ok.p};
identifier r.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct snd_soc_codec_driver i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-09-01 20:55:31 +01:00
..
2015-11-06 11:04:07 -08:00
2015-10-05 17:42:49 +01:00
2014-02-19 13:36:15 +09:00
2014-04-07 10:48:50 +01:00
2015-07-07 13:35:13 +01:00
2014-08-16 17:17:13 -05:00
2015-08-28 17:17:29 +01:00
2016-05-30 16:15:55 +01:00
2016-04-28 18:16:04 +01:00
2015-03-11 19:16:07 +00:00
2016-01-27 20:23:20 +00:00
2015-11-16 13:17:01 +00:00
2015-12-19 12:02:18 +00:00
2016-01-13 12:40:56 +00:00
2014-07-02 20:49:25 +01:00
2013-05-25 10:33:30 -04:00
2016-06-26 12:28:13 +01:00
2015-07-13 11:51:35 +01:00
2015-04-08 19:25:40 +01:00
2013-08-13 11:31:56 +01:00