OpenCloudOS-Kernel/sound/pci/aw2
Bhumika Goyal f3b827e0b1 ALSA: pci: constify snd_kcontrol_new structures
Declare snd_kcontrol_new structures as const as they are only passed as
an argument to the function snd_ctl_new1. This argument is of type
const, so snd_kcontrol_new structures having the same property can be
made const too.
Done using Coccinelle:

@r1 disable optional_qualifier @
identifier i;
position p;
@@
static struct snd_kcontrol_new i@p = {...};

@ok1@
identifier r1.i;
position p;
expression e1;
@@
snd_ctl_new1(&i@p,e1)

@bad@
position p!={r1.p,ok1.p};
identifier r1.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
+const
struct snd_kcontrol_new i;

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-02-21 22:01:21 +01:00
..
Makefile [ALSA] Emagic Audiowerk 2 ALSA driver. 2008-04-24 12:00:13 +02:00
aw2-alsa.c ALSA: pci: constify snd_kcontrol_new structures 2017-02-21 22:01:21 +01:00
aw2-saa7146.c ALSA: Include linux/io.h instead of asm/io.h 2015-01-28 16:49:33 +01:00
aw2-saa7146.h [ALSA] Emagic Audiowerk 2 ALSA driver. 2008-04-24 12:00:13 +02:00
aw2-tsl.c [ALSA] aw2 - Rename aw2-tsl.h to aw2-tsl.c 2008-04-24 12:00:23 +02:00
saa7146.h [ALSA] Emagic Audiowerk 2 ALSA driver. 2008-04-24 12:00:13 +02:00