ALSA: ali5451: Constify hw_constraints
authorTakashi Iwai <tiwai@suse.de>
Wed, 7 Jun 2017 12:17:23 +0000 (14:17 +0200)
committerTakashi Iwai <tiwai@suse.de>
Fri, 9 Jun 2017 08:42:49 +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/ali5451/ali5451.c

index 34bbc2e..8567f1e 100644 (file)
@@ -1602,8 +1602,8 @@ static struct snd_pcm_hardware snd_ali_modem =
 static int snd_ali_modem_open(struct snd_pcm_substream *substream, int rec,
                              int channel)
 {
-       static unsigned int rates[] = {8000, 9600, 12000, 16000};
-       static struct snd_pcm_hw_constraint_list hw_constraint_rates = {
+       static const unsigned int rates[] = {8000, 9600, 12000, 16000};
+       static const struct snd_pcm_hw_constraint_list hw_constraint_rates = {
                .count = ARRAY_SIZE(rates),
                .list = rates,
                .mask = 0,