]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ALSA: hdsp: Constify hw_constraints
authorTakashi Iwai <tiwai@suse.de>
Wed, 7 Jun 2017 12:22:26 +0000 (14:22 +0200)
committerTakashi Iwai <tiwai@suse.de>
Fri, 9 Jun 2017 08:42:54 +0000 (10:42 +0200)
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 <tiwai@suse.de>
sound/pci/rme9652/hdsp.c

index b00009644e0edf36c14ea4a6fe6f3b46d8b99365..fe36d44d16c6de9a8f45abd404ab4dc41c947a83 100644 (file)
@@ -4270,17 +4270,17 @@ static struct snd_pcm_hardware snd_hdsp_capture_subinfo =
        .fifo_size =            0
 };
 
-static unsigned int hdsp_period_sizes[] = { 64, 128, 256, 512, 1024, 2048, 4096, 8192 };
+static const unsigned int hdsp_period_sizes[] = { 64, 128, 256, 512, 1024, 2048, 4096, 8192 };
 
-static struct snd_pcm_hw_constraint_list hdsp_hw_constraints_period_sizes = {
+static const struct snd_pcm_hw_constraint_list hdsp_hw_constraints_period_sizes = {
        .count = ARRAY_SIZE(hdsp_period_sizes),
        .list = hdsp_period_sizes,
        .mask = 0
 };
 
-static unsigned int hdsp_9632_sample_rates[] = { 32000, 44100, 48000, 64000, 88200, 96000, 128000, 176400, 192000 };
+static const unsigned int hdsp_9632_sample_rates[] = { 32000, 44100, 48000, 64000, 88200, 96000, 128000, 176400, 192000 };
 
-static struct snd_pcm_hw_constraint_list hdsp_hw_constraints_9632_sample_rates = {
+static const struct snd_pcm_hw_constraint_list hdsp_hw_constraints_9632_sample_rates = {
        .count = ARRAY_SIZE(hdsp_9632_sample_rates),
        .list = hdsp_9632_sample_rates,
        .mask = 0