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/revo.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sound/pci/ice1712/revo.c') diff --git a/sound/pci/ice1712/revo.c b/sound/pci/ice1712/revo.c index 5cc4213fcad09..6669c389f3367 100644 --- a/sound/pci/ice1712/revo.c +++ b/sound/pci/ice1712/revo.c @@ -235,7 +235,7 @@ static const struct snd_akm4xxx_adc_channel revo51_adc[] = { }, }; -static struct snd_akm4xxx akm_revo_front = { +static const struct snd_akm4xxx akm_revo_front = { .type = SND_AK4381, .num_dacs = 2, .ops = { @@ -256,7 +256,7 @@ static const struct snd_ak4xxx_private akm_revo_front_priv = { .mask_flags = 0, }; -static struct snd_akm4xxx akm_revo_surround = { +static const struct snd_akm4xxx akm_revo_surround = { .type = SND_AK4355, .idx_offset = 1, .num_dacs = 6, @@ -278,7 +278,7 @@ static const struct snd_ak4xxx_private akm_revo_surround_priv = { .mask_flags = 0, }; -static struct snd_akm4xxx akm_revo51 = { +static const struct snd_akm4xxx akm_revo51 = { .type = SND_AK4358, .num_dacs = 8, .ops = { @@ -299,7 +299,7 @@ static const struct snd_ak4xxx_private akm_revo51_priv = { .mask_flags = 0, }; -static struct snd_akm4xxx akm_revo51_adc = { +static const struct snd_akm4xxx akm_revo51_adc = { .type = SND_AK5365, .num_adcs = 2, .adc_info = revo51_adc, @@ -346,7 +346,7 @@ static const struct snd_akm4xxx_dac_channel ap192_dac[] = { AK_DAC("PCM Playback Volume", 2) }; -static struct snd_akm4xxx akm_ap192 = { +static const struct snd_akm4xxx akm_ap192 = { .type = SND_AK4358, .num_dacs = 2, .ops = { -- cgit 1.2.3-korg