linux-stable/drivers/media
Bhumika Goyal 32dd9e873b [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>
2017-01-30 14:47:21 -02:00
..
cec [media] rc-main: assign driver type during allocation 2017-01-30 13:59:57 -02:00
common [media] rc-main: assign driver type during allocation 2017-01-30 13:59:57 -02:00
dvb-core [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
dvb-frontends [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
firewire [media] firewire: don't break long lines 2016-10-21 10:06:00 -02:00
i2c [media] soc-camera: Fix a return value in case of error 2017-01-30 14:46:44 -02:00
mmc
pci [media] rc-main: assign driver type during allocation 2017-01-30 13:59:57 -02:00
platform [media] media: platform: soc_camera_platform : constify v4l2_subdev_* structures 2017-01-30 14:47:21 -02:00
radio [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
rc [media] staging: lirc_imon: port remaining usb ids to imon and remove 2017-01-30 14:34:57 -02:00
spi [media] gs1662: drop kfree for memory allocated with devm_kzalloc 2016-10-24 17:59:08 -02:00
tuners [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
usb [media] rc-main: assign driver type during allocation 2017-01-30 13:59:57 -02:00
v4l2-core [media] media: Rename graph and pipeline structs and functions 2017-01-27 16:13:24 -02:00
cec-edid.c [media] cec-edid: check for IEEE identifier 2016-08-22 14:04:51 -03:00
Kconfig [media] Kconfig: fix breakages when DVB_CORE is not selected 2016-11-18 17:59:17 -02:00
Makefile [media] cec: move the CEC framework out of staging and to media 2016-11-16 15:40:20 -02:00
media-device.c [media] media: Rename graph and pipeline structs and functions 2017-01-27 16:13:24 -02:00
media-devnode.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
media-entity.c [media] media: entity: Add debug information to graph walk 2017-01-30 11:33:26 -02:00