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
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
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
rc
spi
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
Kconfig
Makefile
media-device.c
media-devnode.c
media-entity.c