2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-26 22:24:09 +08:00
linux-next/drivers/media/pci
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
..
b2c2 [media] media: change email address 2016-01-25 12:01:08 -02:00
bt8xx [media] bttv: convert g/s_crop to g/s_selection 2016-08-24 09:48:22 -03:00
cobalt [media] pci: constify snd_pcm_ops structures 2016-09-19 16:18:42 -03:00
cx18 [media] pci: constify snd_pcm_ops structures 2016-09-19 16:18:42 -03:00
cx88 [media] pci: constify snd_pcm_ops structures 2016-09-19 16:18:42 -03:00
cx23885 [media] pci: constify snd_pcm_ops structures 2016-09-19 16:18:42 -03:00
cx25821 [media] pci: constify snd_pcm_ops structures 2016-09-19 16:18:42 -03:00
ddbridge [media] ddbridge: Replace vmalloc with vzalloc 2016-07-08 16:36:43 -03:00
dm1105 [media] dm1105: Remove unnecessary synchronize_irq() before free_irq() 2015-12-03 15:09:28 -02:00
dt3155 [media] vb2: replace void *alloc_ctxs by struct device *alloc_devs 2016-07-08 14:45:07 -03:00
ivtv [media] pci: constify snd_pcm_ops structures 2016-09-19 16:18:42 -03:00
mantis [media] mantis: Fix error handling in mantis_dma_init() 2015-08-19 07:04:55 -03:00
meye [media] meye: embed video_device 2015-04-02 23:35:01 -03:00
netup_unidvb [media] media: pci: netup_unidvb: don't print error when adding adapter fails 2016-08-24 13:56:59 -03:00
ngene [media] constify stv6110x_devctl structure 2016-02-01 07:31:17 -02:00
pluto2
pt1 [media] dvb: Get rid of typedev usage for enums 2015-06-09 17:47:35 -03:00
pt3 [media] media: pci: pt3: don't print error when adding adapter fails 2016-08-24 13:58:46 -03:00
saa7134 [media] pci: constify snd_pcm_ops structures 2016-09-19 16:18:42 -03:00
saa7146 [media] include/media: move driver interface headers to a separate dir 2015-11-17 06:57:29 -02:00
saa7164 [media] saa7164: drop unused saa7164_ctrl struct 2016-07-12 11:11:28 -03:00
smipcie [media] smipcie: add RC map into card configuration options 2016-05-07 10:27:18 -03:00
solo6x10 [media] pci: constify snd_pcm_ops structures 2016-09-19 16:18:42 -03:00
sta2x11 [media] vb2: replace void *alloc_ctxs by struct device *alloc_devs 2016-07-08 14:45:07 -03:00
ttpci [media] ttpci: cleanup a bogus smatch warning 2016-02-23 07:26:22 -03:00
tw68 [media] vb2: replace void *alloc_ctxs by struct device *alloc_devs 2016-07-08 14:45:07 -03:00
tw686x [media] pci: constify snd_pcm_ops structures 2016-09-19 16:18:42 -03:00
tw5864 [media] tw5864: constify struct video_device template 2016-09-19 14:17:19 -03:00
zoran [media] zoran: convert g/s_crop to g/s_selection 2016-08-24 09:51:15 -03:00
Kconfig [media] pci: Add tw5864 driver 2016-08-24 11:17:22 -03:00
Makefile [media] pci: Add tw5864 driver 2016-08-24 11:17:22 -03:00