linux/drivers/media
Bhumika Goyal 4d7aa5e991 [media] drivers: media: i2c: ak881x: 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 used)

@r1 disable optional_qualifier @
identifier i;
position p;
@@
static struct v4l2_subdev_video_ops i@p = {...};

@ok1@
identifier r1.i;
position p;
struct v4l2_subdev_ops obj;
@@
obj.video=&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_video_ops i;

File size before:
  text	   data	    bss	    dec	    hex	filename
   1809	    872	      0	   2681	    a79	drivers/media/i2c/ak881x.o

File size after:
  text	   data	    bss	    dec	    hex	filename
   2185	    496	      0	   2681	    a79	drivers/media/i2c/ak881x.o

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-02-03 09:33:55 -02:00
..
cec [media] rc-main: assign driver type during allocation 2017-01-30 13:59:57 -02:00
common [media] b2c2: use IS_REACHABLE() instead of open-coding it 2017-02-03 07:12:59 -02:00
dvb-core [media] media: Protect enable_source and disable_source handler code paths 2017-02-03 07:39:35 -02:00
dvb-frontends [media] MAINTAINERS: remove hd29l2 2017-02-03 07:01:00 -02:00
firewire [media] firewire: don't break long lines 2016-10-21 10:06:00 -02:00
i2c [media] drivers: media: i2c: ak881x: constify v4l2_subdev_* structures 2017-02-03 09:33:55 -02:00
mmc
pci [media] bt8xx: Delete unnecessary variable initialisations in ca_send_message() 2017-02-03 09:20:11 -02:00
platform [media] v4l: vsp1: Add VIDIOC_EXPBUF support 2017-02-03 09:24:13 -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] lirc: fix null dereference for tx-only devices 2017-01-31 07:32:27 -02:00
spi [media] gs1662: drop kfree for memory allocated with devm_kzalloc 2016-10-24 17:59:08 -02:00
tuners [media] mt2060: implement sleep 2017-02-03 06:55:46 -02:00
usb [media] lmedm04: make lme2510_powerup a little smaller 2017-02-03 07:39:38 -02:00
v4l2-core [media] v4l: async: make v4l2 coexist with devicetree nodes in a dt overlay 2017-02-03 08:05:16 -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