From 3135432e429ef9b69f75ad06e81071e648753a26 Mon Sep 17 00:00:00 2001 From: Bhumika Goyal Date: Fri, 4 Aug 2017 23:19:30 +0530 Subject: ALSA: ice1712: add const to snd_akm4xxx structures Declare snd_akm4xxx 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_akm4xxx 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_akm4xxx s={...}; Signed-off-by: Bhumika Goyal Signed-off-by: Takashi Iwai --- sound/pci/ice1712/delta.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'sound/pci/ice1712/delta.c') diff --git a/sound/pci/ice1712/delta.c b/sound/pci/ice1712/delta.c index 4e470f09e215..6808bed0105e 100644 --- a/sound/pci/ice1712/delta.c +++ b/sound/pci/ice1712/delta.c @@ -445,7 +445,7 @@ static const struct snd_kcontrol_new snd_ice1712_delta1010lt_wordclock_status = * initialize the chips on M-Audio cards */ -static struct snd_akm4xxx akm_audiophile = { +static const struct snd_akm4xxx akm_audiophile = { .type = SND_AK4528, .num_adcs = 2, .num_dacs = 2, @@ -466,7 +466,7 @@ static const struct snd_ak4xxx_private akm_audiophile_priv = { .mask_flags = 0, }; -static struct snd_akm4xxx akm_delta410 = { +static const struct snd_akm4xxx akm_delta410 = { .type = SND_AK4529, .num_adcs = 2, .num_dacs = 8, @@ -487,7 +487,7 @@ static const struct snd_ak4xxx_private akm_delta410_priv = { .mask_flags = 0, }; -static struct snd_akm4xxx akm_delta1010lt = { +static const struct snd_akm4xxx akm_delta1010lt = { .type = SND_AK4524, .num_adcs = 8, .num_dacs = 8, @@ -509,7 +509,7 @@ static const struct snd_ak4xxx_private akm_delta1010lt_priv = { .mask_flags = 0, }; -static struct snd_akm4xxx akm_delta66e = { +static const struct snd_akm4xxx akm_delta66e = { .type = SND_AK4524, .num_adcs = 4, .num_dacs = 4, @@ -532,7 +532,7 @@ static const struct snd_ak4xxx_private akm_delta66e_priv = { }; -static struct snd_akm4xxx akm_delta44 = { +static const struct snd_akm4xxx akm_delta44 = { .type = SND_AK4524, .num_adcs = 4, .num_dacs = 4, @@ -554,7 +554,7 @@ static const struct snd_ak4xxx_private akm_delta44_priv = { .mask_flags = 0, }; -static struct snd_akm4xxx akm_vx442 = { +static const struct snd_akm4xxx akm_vx442 = { .type = SND_AK4524, .num_adcs = 4, .num_dacs = 4, -- cgit v1.2.1