linux/drivers/media/pci/cx23885
Julia Lawall 5c8d8c0192 [media] pci: constify snd_pcm_ops structures
Check for snd_pcm_ops structures that are only stored in the ops field of a
snd_soc_platform_driver structure or passed as the third argument to
snd_pcm_set_ops.  The corresponding field or parameter is declared const,
so snd_pcm_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 snd_pcm_ops i@p = { ... };

@ok1@
identifier r.i;
struct snd_soc_platform_driver e;
position p;
@@
e.ops = &i@p;

@ok2@
identifier r.i;
expression e1, e2;
position p;
@@
snd_pcm_set_ops(e1, e2, &i@p)

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

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

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Andrey Utkin <andrey.utkin@corp.bluecherry.net>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-19 16:18:42 -03:00
..
altera-ci.c [media] cx23885: fix bad indentation 2015-05-01 06:28:16 -03:00
altera-ci.h [media] Add and use IS_REACHABLE macro 2015-04-08 15:02:07 -03:00
cimax2.c [media] cx23885: remove FSF address as per checkpatch 2014-09-03 08:35:55 -03:00
cimax2.h [media] cx23885: remove FSF address as per checkpatch 2014-09-03 08:35:55 -03:00
cx23885-417.c [media] vb2: replace void *alloc_ctxs by struct device *alloc_devs 2016-07-08 14:45:07 -03:00
cx23885-alsa.c [media] pci: constify snd_pcm_ops structures 2016-09-19 16:18:42 -03:00
cx23885-av.c [media] cx23885: uninitialized variable in cx23885_av_work_handler() 2016-04-13 17:10:32 -03:00
cx23885-av.h [media] cx23885: remove FSF address as per checkpatch 2014-09-03 08:35:55 -03:00
cx23885-cards.c [media] cx23885: Add support for Hauppauge WinTV quadHD ATSC version 2016-08-24 16:20:16 -03:00
cx23885-core.c [media] media/pci: convert drivers to use the new vb2_queue dev field 2016-07-08 14:37:17 -03:00
cx23885-dvb.c [media] cx23885: Add support for Hauppauge WinTV quadHD ATSC version 2016-08-24 16:20:16 -03:00
cx23885-f300.c [media] dvb: Get rid of typedev usage for enums 2015-06-09 17:47:35 -03:00
cx23885-f300.h [media] dvb: Get rid of typedev usage for enums 2015-06-09 17:47:35 -03:00
cx23885-i2c.c [media] cx23885: add support for ViewCast 260e and 460e 2015-12-18 13:36:43 -02:00
cx23885-input.c [media] media: cx23885: fix type of allowed_protos 2015-11-19 11:54:21 -02:00
cx23885-input.h [media] cx23885: remove FSF address as per checkpatch 2014-09-03 08:35:55 -03:00
cx23885-ioctl.c [media] cx23885: remove FSF address as per checkpatch 2014-09-03 08:35:55 -03:00
cx23885-ioctl.h [media] cx23885: remove FSF address as per checkpatch 2014-09-03 08:35:55 -03:00
cx23885-ir.c [media] cx23885: remove FSF address as per checkpatch 2014-09-03 08:35:55 -03:00
cx23885-ir.h [media] cx23885: remove FSF address as per checkpatch 2014-09-03 08:35:55 -03:00
cx23885-reg.h [media] cx23885: remove FSF address as per checkpatch 2014-09-03 08:35:55 -03:00
cx23885-vbi.c [media] vb2: replace void *alloc_ctxs by struct device *alloc_devs 2016-07-08 14:45:07 -03:00
cx23885-video.c [media] vb2: replace void *alloc_ctxs by struct device *alloc_devs 2016-07-08 14:45:07 -03:00
cx23885-video.h [media] cx23885: remove FSF address as per checkpatch 2014-09-03 08:35:55 -03:00
cx23885.h [media] cx23885: Add support for Hauppauge WinTV quadHD ATSC version 2016-08-24 16:20:16 -03:00
cx23888-ir.c [media] cx23885: remove FSF address as per checkpatch 2014-09-03 08:35:55 -03:00
cx23888-ir.h [media] cx23885: remove FSF address as per checkpatch 2014-09-03 08:35:55 -03:00
Kconfig [media] cx23885: add support for ViewCast 260e and 460e 2015-12-18 13:36:43 -02:00
Makefile [media] cx23885: remove btcx-risc dependency 2014-09-08 10:01:00 -03:00
netup-eeprom.c [media] cx23885: remove FSF address as per checkpatch 2014-09-03 08:35:55 -03:00
netup-eeprom.h [media] cx23885: remove FSF address as per checkpatch 2014-09-03 08:35:55 -03:00
netup-init.c [media] cx23885: remove FSF address as per checkpatch 2014-09-03 08:35:55 -03:00
netup-init.h [media] cx23885: remove FSF address as per checkpatch 2014-09-03 08:35:55 -03:00