linux/drivers/media/usb/tm6000
Julia Lawall 63f2ec67fa media: tm6000: constify videobuf_queue_ops structures
These videobuf_queue_ops structures are only passed as the second
argument to videobuf_queue_vmalloc_init, which is declared as const.
Thus the videobuf_queue_ops structures themselves can be const.

Done with the help of Coccinelle.

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

@ok1@
identifier r.i;
expression e1;
position p;
@@
videobuf_queue_vmalloc_init(e1,&i@p,...)

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

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct videobuf_queue_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:07:30 -04:00
..
Kconfig
Makefile
tm6000-alsa.c media: usb: make snd_pcm_hardware const 2017-08-20 08:05:10 -04:00
tm6000-cards.c media: usb: constify usb_device_id 2017-08-20 08:04:51 -04:00
tm6000-core.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
tm6000-dvb.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
tm6000-i2c.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
tm6000-input.c [media] tm6000: key_addr is unused 2017-06-06 09:10:11 -03:00
tm6000-regs.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
tm6000-stds.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
tm6000-usb-isoc.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
tm6000-video.c media: tm6000: constify videobuf_queue_ops structures 2017-08-20 08:07:30 -04:00
tm6000.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00