linux/drivers/media/pci/cx18
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
..
cx18-alsa-main.c [media] cx18: embed video_device 2015-04-03 00:05:36 -03:00
cx18-alsa-mixer.c [media] cx18: use v4l2_g/s_ctrl instead of the g/s_ctrl ops 2016-07-12 11:15:51 -03:00
cx18-alsa-mixer.h
cx18-alsa-pcm.c [media] pci: constify snd_pcm_ops structures 2016-09-19 16:18:42 -03:00
cx18-alsa-pcm.h
cx18-alsa.h [media] cx18: remove duplicate CX18_ALSA_DBGFLG_WARN define 2014-07-04 16:09:57 -03:00
cx18-audio.c
cx18-audio.h
cx18-av-audio.c
cx18-av-core.c [media] v4l2: replace s_mbus_fmt by set_fmt 2015-05-01 08:52:34 -03:00
cx18-av-core.h
cx18-av-firmware.c
cx18-av-vbi.c
cx18-cards.c [media] include/media: split I2C headers from V4L2 core 2015-11-17 06:57:11 -02:00
cx18-cards.h [media] cx18: add device_caps support 2014-12-02 11:28:48 -02:00
cx18-controls.c [media] cx231xx: constify cx2341x_handler_ops structures 2015-12-03 11:27:08 -02:00
cx18-controls.h [media] cx231xx: constify cx2341x_handler_ops structures 2015-12-03 11:27:08 -02:00
cx18-driver.c cx18: use macros instead of static const vars 2016-06-24 08:50:24 -03:00
cx18-driver.h cx18: use macros instead of static const vars 2016-06-24 08:50:24 -03:00
cx18-dvb.c
cx18-dvb.h
cx18-fileops.c [media] cx18: add support for control events 2015-04-08 06:41:17 -03:00
cx18-fileops.h
cx18-firmware.c [media] pci drivers: use %zu instead of %zd 2014-09-26 06:51:00 -03:00
cx18-firmware.h
cx18-gpio.c [media] v4l: subdev: Move [gs]_std operation to video ops 2014-05-24 17:11:26 -03:00
cx18-gpio.h
cx18-i2c.c
cx18-i2c.h
cx18-io.c
cx18-io.h
cx18-ioctl.c cx18: use macros instead of static const vars 2016-06-24 08:50:24 -03:00
cx18-ioctl.h
cx18-irq.c
cx18-irq.h
cx18-mailbox.c [media] use v4l2_get_timestamp where possible 2015-10-01 08:29:23 -03:00
cx18-mailbox.h
cx18-queue.c [media] pci drivers: use %zu instead of %zd 2014-09-26 06:51:00 -03:00
cx18-queue.h
cx18-scb.c
cx18-scb.h
cx18-streams.c cx18: use macros instead of static const vars 2016-06-24 08:50:24 -03:00
cx18-streams.h [media] cx18: embed video_device 2015-04-03 00:05:36 -03:00
cx18-vbi.c cx18: use macros instead of static const vars 2016-06-24 08:50:24 -03:00
cx18-vbi.h
cx18-version.h
cx18-video.c
cx18-video.h
cx23418.h [media] include/media: move driver interface headers to a separate dir 2015-11-17 06:57:29 -02:00
Kconfig
Makefile