1
0
Fork 0
remarkable-linux/drivers/staging/media/davinci_vpfe
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
..
Kconfig
Makefile [media] staging: media: davinci_vfpe: allow modular build 2016-11-23 13:57:35 -02:00
TODO
davinci-vpfe-mc.txt
davinci_vpfe_user.h Staging: media: davinci_vpfe - style fix 2017-03-14 06:03:50 +08:00
dm365_ipipe.c Staging: media: Unmap and release region obtained by ioremap_nocache 2017-03-21 08:52:29 +01:00
dm365_ipipe.h
dm365_ipipe_hw.c Staging: media: davinci_vpfe - style fix 2017-03-14 06:03:50 +08:00
dm365_ipipe_hw.h
dm365_ipipeif.c
dm365_ipipeif.h
dm365_ipipeif_user.h
dm365_isif.c
dm365_isif.h
dm365_isif_regs.h Staging: media: davinci_vpfe - style fix 2017-03-14 06:03:50 +08:00
dm365_resizer.c Staging: media: davinci_vpfe - style fix 2017-03-14 06:03:50 +08:00
dm365_resizer.h [media] staging: media: davinci_vpfe: dm365_resizer: Fix some spelling mistakes 2016-11-23 13:56:04 -02:00
vpfe.h
vpfe_mc_capture.c staging: vpfe_mc_capture: Clean up tests if NULL returned on failure 2017-03-12 14:57:00 +01:00
vpfe_mc_capture.h
vpfe_video.c media: staging: media: davinci_vpfe: constify vb2_ops structures 2017-08-20 08:03:30 -04:00
vpfe_video.h [media] media: Rename graph and pipeline structs and functions 2017-01-27 16:13:24 -02:00