summaryrefslogtreecommitdiff
path: root/sound/core/pcm_native.c
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2017-05-17 08:48:17 +0900
committerTakashi Iwai <tiwai@suse.de>2017-05-17 07:24:24 +0200
commit8b674308a26a774896652dafe0dac7ee297eed9b (patch)
treeedd256fc9b1baf8183e3c4519cb96b79838e5aa9 /sound/core/pcm_native.c
parenta96801b504bc44d71c54cc6464c6de1465d79b54 (diff)
ALSA: pcm: add const qualifier for read-only table for sampling rate
There's a read-only table for each sampling rate, while it doesn't have const qualifier and can be modified. This commit add the qualifier. As a result, a symbol for the table moves from .data section to .rodata. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/pcm_native.c')
-rw-r--r--sound/core/pcm_native.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index 13dec5ec93f2..d5a967b57bb4 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -1986,8 +1986,10 @@ static int snd_pcm_hw_rule_sample_bits(struct snd_pcm_hw_params *params,
#error "Change this table"
#endif
-static unsigned int rates[] = { 5512, 8000, 11025, 16000, 22050, 32000, 44100,
- 48000, 64000, 88200, 96000, 176400, 192000 };
+static const unsigned int rates[] = {
+ 5512, 8000, 11025, 16000, 22050, 32000, 44100,
+ 48000, 64000, 88200, 96000, 176400, 192000
+};
const struct snd_pcm_hw_constraint_list snd_pcm_known_rates = {
.count = ARRAY_SIZE(rates),