linux/sound/pci/emu10k1
Julia Lawall 6769e988b0 ALSA: 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>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-09-02 11:49:10 +02:00
..
emu10k1_callback.c ALSA: emu10k1: Emu10k2 32 bit DMA mode 2015-04-29 07:27:30 +02:00
emu10k1_main.c ALSA: emu10k1: correctly handling failed thread creation 2016-01-29 17:30:25 +01:00
emu10k1_patch.c ALSA: emu10k1: Use standard printk helpers 2014-02-26 16:45:27 +01:00
emu10k1_synth_local.h [ALSA] Remove sound/driver.h 2008-01-31 17:29:48 +01:00
emu10k1_synth.c ALSA: seq: Define driver object in each driver 2015-02-12 14:15:54 +01:00
emu10k1.c ALSA: emu10k1: Fix card shortname string buffer overflow 2015-04-27 13:00:09 +02:00
emu10k1x.c ALSA: constify snd_pcm_ops structures 2016-09-02 11:49:10 +02:00
emufx.c ALSA: emu10k1: Remove always NULL parameters 2015-01-02 16:32:45 +01:00
emumixer.c ALSA: emu10k1: rename Audigy Analog Capture Boost control 2015-07-08 09:40:44 +02:00
emumpu401.c ALSA: emu10k1: Use standard printk helpers 2014-02-26 16:45:27 +01:00
emupcm.c ALSA: constify snd_pcm_ops structures 2016-09-02 11:49:10 +02:00
emuproc.c ALSA: emu10k1: Fix/cleanup ifdef CONFIG_PROC_FS 2015-05-29 07:56:42 +02:00
io.c ALSA: emu10k1: Fix possible NULL dereference 2014-03-05 12:15:56 +01:00
irq.c ALSA: emu10k1: Use standard printk helpers 2014-02-26 16:45:27 +01:00
Makefile ALSA: emu10k1: Fix/cleanup ifdef CONFIG_PROC_FS 2015-05-29 07:56:42 +02:00
memory.c ALSA: emu10k1: Emu10k2 32 bit DMA mode 2015-04-29 07:27:30 +02:00
p16v.c ALSA: constify snd_pcm_ops structures 2016-09-02 11:49:10 +02:00
p16v.h Fix common misspellings 2011-03-31 11:26:23 -03:00
p17v.h
timer.c ALSA: pci: remove __dev* attributes 2012-12-07 07:20:55 +01:00
tina2.h
voice.c ALSA: emu10k1: Use standard printk helpers 2014-02-26 16:45:27 +01:00