Skip to content

Commit

Permalink
ASoC: cs42l73: Constify rate constraints
Browse files Browse the repository at this point in the history
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 <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Lars-Peter Clausen authored and Mark Brown committed Feb 7, 2014
1 parent 6e84b97 commit 096ae54
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/soc/codecs/cs42l73.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
};
Expand Down Expand Up @@ -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,
};
Expand Down

0 comments on commit 096ae54

Please sign in to comment.