alistair23-linux/drivers/media/platform/xilinx
Bhumika Goyal cebb31c8b5 [media] media: platform: xilinx: xilinx-tpg: constify v4l2_subdev_* structures
v4l2_subdev_{core/pad/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
   6170	   2752	    144	   9066	   236a media/platform/xilinx/xilinx-tpg.o

File size after:
   text	   data	    bss	    dec	    hex	filename
   6666	   2384	      8	   9058	   2362 media/platform/xilinx/xilinx-tpg.o

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-02-03 09:21:50 -02:00
..
Kconfig [media] v4l: xilinx: VIDEO_XILINX should depend on HAS_DMA 2015-05-01 07:10:09 -03:00
Makefile [media] v4l: xilinx: Add Test Pattern Generator driver 2015-04-03 01:04:18 -03:00
xilinx-dma.c [media] xilinx: Use a local media device pointer instead 2017-01-30 11:35:02 -02:00
xilinx-dma.h [media] media/platform: convert drivers to use the new vb2_queue dev field 2016-07-08 14:40:07 -03:00
xilinx-tpg.c [media] media: platform: xilinx: xilinx-tpg: constify v4l2_subdev_* structures 2017-02-03 09:21:50 -02:00
xilinx-vip.c
xilinx-vip.h
xilinx-vipp.c [media] xilinx-vipp: remove unnecessary of_node_put 2016-05-07 11:45:38 -03:00
xilinx-vipp.h
xilinx-vtc.c [media] v4l: xilinx: Add Video Timing Controller driver 2015-04-03 01:01:37 -03:00
xilinx-vtc.h [media] v4l: xilinx: Add Video Timing Controller driver 2015-04-03 01:01:37 -03:00