Skip to content

Commit

Permalink
ASoC: wm8741: 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>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
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 70bad2c
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions sound/soc/codecs/wm8741.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ struct wm8741_priv {
struct regmap *regmap;
struct regulator_bulk_data supplies[WM8741_NUM_SUPPLIES];
unsigned int sysclk;
struct snd_pcm_hw_constraint_list *sysclk_constraints;
const struct snd_pcm_hw_constraint_list *sysclk_constraints;
};

static const struct reg_default wm8741_reg_defaults[] = {
Expand Down Expand Up @@ -122,74 +122,74 @@ static struct {
{ 6, 768 },
};

static unsigned int rates_11289[] = {
static const unsigned int rates_11289[] = {
44100, 88235,
};

static struct snd_pcm_hw_constraint_list constraints_11289 = {
static const struct snd_pcm_hw_constraint_list constraints_11289 = {
.count = ARRAY_SIZE(rates_11289),
.list = rates_11289,
};

static unsigned int rates_12288[] = {
static const unsigned int rates_12288[] = {
32000, 48000, 96000,
};

static struct snd_pcm_hw_constraint_list constraints_12288 = {
static const struct snd_pcm_hw_constraint_list constraints_12288 = {
.count = ARRAY_SIZE(rates_12288),
.list = rates_12288,
};

static unsigned int rates_16384[] = {
static const unsigned int rates_16384[] = {
32000,
};

static struct snd_pcm_hw_constraint_list constraints_16384 = {
static const struct snd_pcm_hw_constraint_list constraints_16384 = {
.count = ARRAY_SIZE(rates_16384),
.list = rates_16384,
};

static unsigned int rates_16934[] = {
static const unsigned int rates_16934[] = {
44100, 88235,
};

static struct snd_pcm_hw_constraint_list constraints_16934 = {
static const struct snd_pcm_hw_constraint_list constraints_16934 = {
.count = ARRAY_SIZE(rates_16934),
.list = rates_16934,
};

static unsigned int rates_18432[] = {
static const unsigned int rates_18432[] = {
48000, 96000,
};

static struct snd_pcm_hw_constraint_list constraints_18432 = {
static const struct snd_pcm_hw_constraint_list constraints_18432 = {
.count = ARRAY_SIZE(rates_18432),
.list = rates_18432,
};

static unsigned int rates_22579[] = {
static const unsigned int rates_22579[] = {
44100, 88235, 1764000
};

static struct snd_pcm_hw_constraint_list constraints_22579 = {
static const struct snd_pcm_hw_constraint_list constraints_22579 = {
.count = ARRAY_SIZE(rates_22579),
.list = rates_22579,
};

static unsigned int rates_24576[] = {
static const unsigned int rates_24576[] = {
32000, 48000, 96000, 192000
};

static struct snd_pcm_hw_constraint_list constraints_24576 = {
static const struct snd_pcm_hw_constraint_list constraints_24576 = {
.count = ARRAY_SIZE(rates_24576),
.list = rates_24576,
};

static unsigned int rates_36864[] = {
static const unsigned int rates_36864[] = {
48000, 96000, 19200
};

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

0 comments on commit 70bad2c

Please sign in to comment.