From: Lars-Peter Clausen Date: Wed, 5 Feb 2014 20:54:32 +0000 (+0100) Subject: ASoC: cs42l73: Constify rate constraints X-Git-Tag: v4.14-rc1~7708^2~1^2~5^2~7^8~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=096ae5444b8600bbee0501b01987094657a1458e;p=platform%2Fkernel%2Flinux-rpi.git ASoC: cs42l73: Constify rate constraints The rate constraints in this driver are shared between all device instances. It should not be (and is not) modified at runtime, so make them const. While we are at it also change the type for the rates array from u32 to unsigned int. Signed-off-by: Lars-Peter Clausen Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/cs42l73.c b/sound/soc/codecs/cs42l73.c index 7cae046..69c8e2d 100644 --- a/sound/soc/codecs/cs42l73.c +++ b/sound/soc/codecs/cs42l73.c @@ -1108,7 +1108,7 @@ static int cs42l73_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) return 0; } -static u32 cs42l73_asrc_rates[] = { +static const unsigned int cs42l73_asrc_rates[] = { 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000 }; @@ -1241,7 +1241,7 @@ static int cs42l73_set_tristate(struct snd_soc_dai *dai, int tristate) 0x7F, tristate << 7); } -static struct snd_pcm_hw_constraint_list constraints_12_24 = { +static const struct snd_pcm_hw_constraint_list constraints_12_24 = { .count = ARRAY_SIZE(cs42l73_asrc_rates), .list = cs42l73_asrc_rates, };