linux/drivers/staging/media
Julia Lawall 22f438889f media: staging: media: davinci_vpfe: constify vb2_ops structures
These vb2_ops structures are only stored in the ops field of a
vb2_queue structure, which is declared as const.  Thus the vb2_ops
structures themselves can be const.

Done with the help of Coccinelle.

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct vb2_ops i@p = { ... };

@ok@
identifier r.i;
struct vb2_queue e;
position p;
@@
e.ops = &i@p;

@bad@
position p != {r.p,ok.p};
identifier r.i;
struct vb2_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct vb2_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20 08:03:30 -04:00
..
atomisp media: staging: media: atomisp: constify video_subdev structures 2017-08-09 10:53:47 -04:00
bcm2048 media: radio-bcm2048: get rid of BCM2048_DRIVER_VERSION 2017-07-20 16:21:21 -04:00
cxd2099 media: staging: cxd2099: Activate cxd2099 buffer mode 2017-06-26 08:19:13 -03:00
davinci_vpfe media: staging: media: davinci_vpfe: constify vb2_ops structures 2017-08-20 08:03:30 -04:00
imx media: staging/imx: remove confusing IS_ERR_OR_NULL usage 2017-08-08 06:48:58 -04:00
lirc [media] staging: remove todo and replace with lirc_zilog todo 2017-06-06 09:18:08 -03:00
omap4iss [media] staging: media: omap4iss: Replace a bit shift by a use of BIT 2017-04-18 12:13:11 -03:00
Kconfig [media] media: Add i.MX media core driver 2017-06-20 07:30:38 -03:00
Makefile [media] media: Add i.MX media core driver 2017-06-20 07:30:38 -03:00