ALSA: atiixp: Constify hw_constraints
authorTakashi Iwai <tiwai@suse.de>
Wed, 7 Jun 2017 12:17:39 +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/atiixp_modem.c

index 40152feef1e7e82c98f34985888f6ddf2533e961..52e0ea7b9b80003cd4e7cce20f34ec13fd7604e4 100644 (file)
@@ -860,8 +860,8 @@ static int snd_atiixp_pcm_open(struct snd_pcm_substream *substream,
        struct atiixp_modem *chip = snd_pcm_substream_chip(substream);
        struct snd_pcm_runtime *runtime = substream->runtime;
        int err;
-       static unsigned int rates[] = { 8000,  9600, 12000, 16000 };
-       static struct snd_pcm_hw_constraint_list hw_constraints_rates = {
+       static const unsigned int rates[] = { 8000,  9600, 12000, 16000 };
+       static const struct snd_pcm_hw_constraint_list hw_constraints_rates = {
                .count = ARRAY_SIZE(rates),
                .list = rates,
                .mask = 0,