summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/wm8988.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2014-02-05 20:54:36 (GMT)
committerMark Brown <broonie@linaro.org>2014-02-07 12:19:02 (GMT)
commitb57efda1f0372d6107ced5a255384be9fd449260 (patch)
treefab5a0f6afc837eed427f973b1532e556e6aa705 /sound/soc/codecs/wm8988.c
parent38dbfb59d1175ef458d006556061adeaa8751b72 (diff)
downloadlinux-b57efda1f0372d6107ced5a255384be9fd449260.tar.xz
ASoC: wm8988: 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. 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>
Diffstat (limited to 'sound/soc/codecs/wm8988.c')
-rw-r--r--sound/soc/codecs/wm8988.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sound/soc/codecs/wm8988.c b/sound/soc/codecs/wm8988.c
index a55e1c2..c6e4aba 100644
--- a/sound/soc/codecs/wm8988.c
+++ b/sound/soc/codecs/wm8988.c
@@ -116,7 +116,7 @@ static bool wm8988_writeable(struct device *dev, unsigned int reg)
struct wm8988_priv {
struct regmap *regmap;
unsigned int sysclk;
- struct snd_pcm_hw_constraint_list *sysclk_constraints;
+ const struct snd_pcm_hw_constraint_list *sysclk_constraints;
};
#define wm8988_reset(c) snd_soc_write(c, WM8988_RESET, 0)
@@ -521,30 +521,30 @@ static inline int get_coeff(int mclk, int rate)
/* The set of rates we can generate from the above for each SYSCLK */
-static unsigned int rates_12288[] = {
+static const unsigned int rates_12288[] = {
8000, 12000, 16000, 24000, 24000, 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_112896[] = {
+static const unsigned int rates_112896[] = {
8000, 11025, 22050, 44100,
};
-static struct snd_pcm_hw_constraint_list constraints_112896 = {
+static const struct snd_pcm_hw_constraint_list constraints_112896 = {
.count = ARRAY_SIZE(rates_112896),
.list = rates_112896,
};
-static unsigned int rates_12[] = {
+static const unsigned int rates_12[] = {
8000, 11025, 12000, 16000, 22050, 2400, 32000, 41100, 48000,
48000, 88235, 96000,
};
-static struct snd_pcm_hw_constraint_list constraints_12 = {
+static const struct snd_pcm_hw_constraint_list constraints_12 = {
.count = ARRAY_SIZE(rates_12),
.list = rates_12,
};