Skip to content

Commit

Permalink
ASoC: ssm2602: 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.

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 38dbfb5 commit f75ac2d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sound/soc/codecs/ssm2602.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ enum ssm2602_type {
/* codec private data */
struct ssm2602_priv {
unsigned int sysclk;
struct snd_pcm_hw_constraint_list *sysclk_constraints;
const struct snd_pcm_hw_constraint_list *sysclk_constraints;

struct regmap *regmap;

Expand Down Expand Up @@ -197,7 +197,7 @@ static const unsigned int ssm2602_rates_12288000[] = {
8000, 16000, 32000, 48000, 96000,
};

static struct snd_pcm_hw_constraint_list ssm2602_constraints_12288000 = {
static const struct snd_pcm_hw_constraint_list ssm2602_constraints_12288000 = {
.list = ssm2602_rates_12288000,
.count = ARRAY_SIZE(ssm2602_rates_12288000),
};
Expand All @@ -206,7 +206,7 @@ static const unsigned int ssm2602_rates_11289600[] = {
8000, 44100, 88200,
};

static struct snd_pcm_hw_constraint_list ssm2602_constraints_11289600 = {
static const struct snd_pcm_hw_constraint_list ssm2602_constraints_11289600 = {
.list = ssm2602_rates_11289600,
.count = ARRAY_SIZE(ssm2602_rates_11289600),
};
Expand Down

0 comments on commit f75ac2d

Please sign in to comment.