]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ALSA: gus: Constify hw_constraints
authorTakashi Iwai <tiwai@suse.de>
Wed, 7 Jun 2017 12:16:25 +0000 (14:16 +0200)
committerTakashi Iwai <tiwai@suse.de>
Fri, 9 Jun 2017 08:42:47 +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/isa/gus/gus_pcm.c

index b9f6dcbef8890239d599404a1fca61674de7e7f2..6b3da01a93b7b0c82e612671c30277f8fbea5ebf 100644 (file)
@@ -562,14 +562,14 @@ static snd_pcm_uframes_t snd_gf1_pcm_playback_pointer(struct snd_pcm_substream *
        return pos;
 }
 
-static struct snd_ratnum clock = {
+static const struct snd_ratnum clock = {
        .num = 9878400/16,
        .den_min = 2,
        .den_max = 257,
        .den_step = 1,
 };
 
-static struct snd_pcm_hw_constraint_ratnums hw_constraints_clocks  = {
+static const struct snd_pcm_hw_constraint_ratnums hw_constraints_clocks  = {
        .nrats = 1,
        .rats = &clock,
 };