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>
This commit is contained in:
Bhumika Goyal
2017-08-04 21:04:41 +05:30
committed by Takashi Iwai
parent 6d4d41f011
commit 4647e8d512
5 changed files with 16 additions and 16 deletions

View File

@@ -278,7 +278,7 @@ static int snd_ice1712_value_init(struct snd_ice1712 *ice)
}
};
static struct snd_ak4xxx_private akm_stdsp24_mv_priv = {
static const struct snd_ak4xxx_private akm_stdsp24_mv_priv = {
.caddr = 2,
.cif = 1, /* CIF high */
.data_mask = ICE1712_STDSP24_SERIAL_DATA,