projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2ea659a
)
ASoC: cs35l34: Constify hw_constraints
author
Takashi Iwai
<
[email protected]
>
Thu, 8 Jun 2017 21:37:19 +0000
(23:37 +0200)
committer
Mark Brown
<
[email protected]
>
Tue, 13 Jun 2017 20:30:12 +0000
(21:30 +0100)
snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the
const pointers. Constify the corresponding static objects for better
hardening.
Signed-off-by: Takashi Iwai <
[email protected]
>
Signed-off-by: Mark Brown <
[email protected]
>
sound/soc/codecs/cs35l34.c
patch
|
blob
|
history
diff --git
a/sound/soc/codecs/cs35l34.c
b/sound/soc/codecs/cs35l34.c
index 7c5d1510cf2cb293638ce3f7ef360cd5f7789b1c..0a747c66cc6ccc593036775f51ae4eaa050cc850 100644
(file)
--- a/
sound/soc/codecs/cs35l34.c
+++ b/
sound/soc/codecs/cs35l34.c
@@
-567,12
+567,12
@@
static int cs35l34_pcm_hw_params(struct snd_pcm_substream *substream,
return ret;
}
-static unsigned int cs35l34_src_rates[] = {
+static
const
unsigned int cs35l34_src_rates[] = {
8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000
};
-static struct snd_pcm_hw_constraint_list cs35l34_constraints = {
+static
const
struct snd_pcm_hw_constraint_list cs35l34_constraints = {
.count = ARRAY_SIZE(cs35l34_src_rates),
.list = cs35l34_src_rates,
};