diff options
author | Bhumika Goyal <bhumirks@gmail.com> | 2016-12-12 06:09:53 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-01-30 14:47:21 -0200 |
commit | 32dd9e873bba08fbcf31682c38c76efd90a476e3 (patch) | |
tree | 6d523838324736ac1aec48bc39378d11d485e526 /drivers/media/i2c/adv7604.c | |
parent | a5bc63f28a384e2961dcd9069d71ccded8406ce6 (diff) |
[media] media: platform: soc_camera_platform : constify v4l2_subdev_* structures
v4l2_subdev_{core/video}_ops structures are stored in the
fields of the v4l2_subdev_ops structure which are of type const.
Also, v4l2_subdev_ops structure is passed to a function
having its argument of type const. As these structures are never
modified, so declare them as const.
Done using Coccinelle:(One of the scripts)
@r1 disable optional_qualifier @
identifier i;
position p;
@@
static struct v4l2_subdev_core_ops i@p = {...};
@ok1@
identifier r1.i;
position p;
struct v4l2_subdev_ops obj;
@@
obj.core=&i@p;
@bad@
position p!={r1.p,ok1.p};
identifier r1.i;
@@
i@p
@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
+const
struct v4l2_subdev_core_ops i;
File size before:
text data bss dec hex filename
858 576 0 1434 59a soc_camera/soc_camera_platform.o
File size after:
text data bss dec hex filename
1234 192 0 1426 592 soc_camera/soc_camera_platform.o
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/i2c/adv7604.c')
0 files changed, 0 insertions, 0 deletions