2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-21 03:33:59 +08:00
linux-next/drivers/media/usb/stk1160
Julia Lawall 1bc177174b [media] usb: constify vb2_ops structures
Check for vb2_ops structures that are only stored in the ops field of a
vb2_queue structure.  That field is declared const, so vb2_ops structures
that have this property can be declared as const also.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <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>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-19 16:20:35 -03:00
..
Kconfig [media] stk1160: Build as a module if SND is m and audio support is selected 2013-08-01 14:55:25 -03:00
Makefile
stk1160-ac97.c [media] stk1160: warrant a NUL terminated string 2014-04-08 11:00:52 -03:00
stk1160-core.c [media] include/media: split I2C headers from V4L2 core 2015-11-17 06:57:11 -02:00
stk1160-i2c.c [media] stk1160: Check return value of stk1160_read_reg() in stk1160_i2c_read_reg() 2012-10-28 16:41:54 -02:00
stk1160-reg.h [media] stk1160: Add frame scaling support 2015-07-17 09:52:31 -03:00
stk1160-v4l.c [media] usb: constify vb2_ops structures 2016-09-19 16:20:35 -03:00
stk1160-video.c [media] media: usb: stk1160: stk1160-video: don't print error when allocating urb fails 2016-08-24 09:26:01 -03:00
stk1160.h [media] media: videobuf2: Restructure vb2_buffer 2015-10-01 09:04:43 -03:00