mfd: kempld-core: Constify variables that point to const structure
authorJulia Lawall <Julia.Lawall@lip6.fr>
Wed, 13 Jun 2018 04:48:09 +0000 (06:48 +0200)
committerLee Jones <lee.jones@linaro.org>
Fri, 27 Jul 2018 07:13:24 +0000 (08:13 +0100)
commitbf1cafa18be3b73ad30a3bbf2c3dae5ef333189a
tree629304e63d98e9f81295a89675d373ead535a2c7
parente5ff19cf75f33a4654fc54631577146a1162d527
mfd: kempld-core: Constify variables that point to const structure

Add const to the declaration of various local variables of type
kempld_platform_data for which the referenced value is always only
dereferenced or passed to a const parameter, to record the fact that
kempld_platform_data_generic is declared as const.

The semantic match that finds this issue is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r@
identifier i,j;
@@
const struct i j = { ... };

@ok@
identifier r.i;
position p;
@@
const struct i@p *

@@
identifier r.i;
position p != ok.p;
@@
* struct i@p *
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/kempld-core.c