linux-stable/sound/pci/asihpi
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
..
asihpi.c ALSA: constify snd_pcm_ops structures 2016-09-02 11:49:10 +02:00
hpi.h ALSA: asihpi: New I/O types - AVB & BLUlink, DAB Rf receiver 2014-11-22 22:25:51 +01:00
hpi6000.c ALSA: asihpi: fix an information leak in asihpi_hpi_ioctl() 2014-12-31 14:12:43 +01:00
hpi6000.h ALSA: asihpi - Update copyright to 2011 2011-12-22 08:12:57 +01:00
hpi6205.c ALSA: asihpi: Add support for stream interrupt. 2014-11-22 22:33:13 +01:00
hpi6205.h ALSA: asihpi - Increase request and response buffer sizes 2011-07-22 07:45:26 +02:00
hpi_internal.h ALSA: asihpi: increase tuner pad cache size 2014-12-18 08:48:24 +01:00
hpi_version.h ALSA: asihpi: update to HPI version 4.14 2014-12-18 08:48:47 +01:00
hpicmn.c ALSA: asihpi: Refactor control cache code. 2014-11-22 22:29:58 +01:00
hpicmn.h ALSA: asihpi: Add support for stream interrupt. 2014-11-22 22:33:13 +01:00
hpidebug.c ALSA: asihpi - Update copyright to 2011 2011-12-22 08:12:57 +01:00
hpidebug.h ALSA: asihpi - Update copyright to 2011 2011-12-22 08:12:57 +01:00
hpidspcd.c ALSA: asihpi: relax firmware version check 2014-12-18 08:40:06 +01:00
hpidspcd.h ALSA: asihpi - Split hpi version info into separate header file. 2011-12-22 08:12:56 +01:00
hpifunc.c ALSA: asihpi - Add autofade query. 2011-12-22 08:13:07 +01:00
hpimsginit.c ALSA: asihpi: used parts of message/response are zeroed before use 2014-11-22 22:34:06 +01:00
hpimsginit.h ALSA: asihpi - Update copyright to 2011 2011-12-22 08:12:57 +01:00
hpimsgx.c ALSA: asihpi: Turn off msg/resp logging after DSP has crashed. 2014-11-22 22:33:25 +01:00
hpimsgx.h ALSA: asihpi - Update copyright to 2011 2011-12-22 08:12:57 +01:00
hpioctl.c x86/mm: Decouple <linux/vmalloc.h> from <asm/io.h> 2015-06-03 12:02:00 +02:00
hpioctl.h ALSA: pci: remove __dev* attributes 2012-12-07 07:20:55 +01:00
hpios.c ALSA: asihpi - fix return value of hpios_locked_mem_alloc() 2012-03-30 16:24:48 +02:00
hpios.h ALSA: asihpi: Add support for stream interrupt. 2014-11-22 22:33:13 +01:00
hpipcida.h ALSA: asihpi - Update copyright to 2011 2011-12-22 08:12:57 +01:00
Makefile