linux/sound/pci/oxygen
Julia Lawall bc9a910b15 ALSA: oxygen: 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: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-09-02 11:50:42 +02:00
..
ak4396.h
cm9780.h
cs2000.h
cs4245.h ALSA: oxygen: Xonar DG(X): add new CS4245 SPI functions 2014-01-29 20:45:46 +01:00
cs4362a.h
cs4398.h
Makefile ALSA: add Studio Evolution SE6X support 2015-01-16 22:44:56 +01:00
oxygen_io.c ALSA: Include linux/io.h instead of asm/io.h 2015-01-28 16:49:33 +01:00
oxygen_lib.c ALSA: pci: Drop superfluous ifdef CONFIG_PROC_FS 2015-05-29 08:00:06 +02:00
oxygen_mixer.c ALSA: oxygen: Fix logical-not-parentheses warning 2015-08-03 10:15:09 +02:00
oxygen_pcm.c ALSA: oxygen: constify snd_pcm_ops structures 2016-09-02 11:50:42 +02:00
oxygen_regs.h ALSA: oxygen: add mute mask for the OXYGEN_PLAY_ROUTING register 2014-01-29 20:45:44 +01:00
oxygen.c PCI: Remove DEFINE_PCI_DEVICE_TABLE macro use 2014-08-12 12:15:14 -06:00
oxygen.h ALSA: oxygen: add support for third analog input 2015-01-16 22:44:08 +01:00
pcm1796.h
se6x.c ALSA: add Studio Evolution SE6X support 2015-01-16 22:44:56 +01:00
virtuoso.c ALSA: virtuoso: add partial Xonar Xense support 2014-09-22 08:55:15 +02:00
wm8766.h
wm8776.h
wm8785.h
xonar_cs43xx.c ALSA: oxygen: remove __dev* attributes 2012-12-07 07:32:02 +01:00
xonar_dg_mixer.c ALSA: oxygen: Xonar DG(X): cleanup and minor changes 2014-01-29 20:45:53 +01:00
xonar_dg.c ALSA: oxygen: Xonar DG(X): fix Stereo Upmixing regression 2014-03-18 09:51:58 +01:00
xonar_dg.h ALSA: oxygen: Xonar DG(X): cleanup and minor changes 2014-01-29 20:45:53 +01:00
xonar_hdmi.c ALSA: oxygen: Use standard printk helpers 2014-02-26 16:45:30 +01:00
xonar_lib.c ALSA: oxygen: Use standard printk helpers 2014-02-26 16:45:30 +01:00
xonar_pcm179x.c ALSA: virtuoso: add partial Xonar Xense support 2014-09-22 08:55:15 +02:00
xonar_wm87x6.c ALSA: jack: extend snd_jack_new to support phantom jack 2015-04-27 21:37:41 +02:00
xonar.h