OpenCloudOS-Kernel/drivers/media/platform/s3c-camif
Bhumika Goyal 10106c13f4 [media] media: platform: s3c-camif: constify v4l2_subdev_ops structures
Check for v4l2_subdev_ops structures that are only passed as an
argument to the function v4l2_subdev_init. This argument is of type
const, so v4l2_subdev_ops structures having this property can also  be
declared const.
Done using Coccinelle:

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

@ok1@
identifier r1.i;
position p;
@@
v4l2_subdev_init(...,&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_ops i;

File size before:
   text	   data	    bss	    dec	    hex	filename
  17171	   1912	     20	  19103	   4a9f
platform/s3c-camif/camif-capture.o

File size after:
   text	   data	    bss	    dec	    hex	filename
  17235	   1848	     20	  19103	   4a9f
platform/s3c-camif/camif-capture.o

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-02-03 10:58:00 -02:00
..
Makefile
camif-capture.c [media] media: platform: s3c-camif: constify v4l2_subdev_ops structures 2017-02-03 10:58:00 -02:00
camif-core.c [media] media/platform: convert drivers to use the new vb2_queue dev field 2016-07-08 14:42:09 -03:00
camif-core.h [media] media/platform: convert drivers to use the new vb2_queue dev field 2016-07-08 14:42:09 -03:00
camif-regs.c [media] platform: Make use of media_bus_format enum 2014-11-14 17:54:08 -02:00
camif-regs.h [media] include/media: move driver interface headers to a separate dir 2015-11-17 06:57:29 -02:00