]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: ice1712: add const to snd_ak4xxx_private structures
authorBhumika Goyal <bhumirks@gmail.com>
Fri, 4 Aug 2017 15:34:41 +0000 (21:04 +0530)
committerTakashi Iwai <tiwai@suse.de>
Sun, 6 Aug 2017 20:16:37 +0000 (22:16 +0200)
commit2193c3a7644497d8b317ffbd52bc0001deefb194
tree545674c416e4becc6ac04988cfd11ec98d05b107
parente928b4b37a85c18e8a85de5fccf4e59ea07bbda6
ALSA: ice1712: add const to snd_ak4xxx_private structures

Declare snd_ak4xxx_private structures  as const as they are only passed
to the function snd_ice1712_akm4xxx_init. This argument is of type const,
so make the structures const.
Done using Coccinelle:

@match disable optional_qualifier@
identifier s;
position p;
@@
static struct snd_ak4xxx_private s@p={...};

@good1@
identifier match.s;
position p;
@@
snd_ice1712_akm4xxx_init(...,&s@p,...)

@bad@
identifier match.s;
position p!={match.p,good1.p};
@@
s@p

@depends on !bad disable optional_qualifier@
identifier match.s;
@@
static
+const
struct snd_ak4xxx_private s={...};

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/ice1712/delta.c
sound/pci/ice1712/ews.c
sound/pci/ice1712/hoontech.c
sound/pci/ice1712/phase.c
sound/pci/ice1712/revo.c