]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ALSA: es1688: Constify hw_constraints
authorTakashi Iwai <tiwai@suse.de>
Wed, 7 Jun 2017 12:15:49 +0000 (14:15 +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/es1688/es1688_lib.c

index 81cf26fa28d60427d4280b0ba43e3a6576ac7fa1..5d3df96c5e5bc8dc12908f41601af5e80bcc6279 100644 (file)
@@ -290,7 +290,7 @@ static int snd_es1688_init(struct snd_es1688 * chip, int enable)
 
  */
 
-static struct snd_ratnum clocks[2] = {
+static const struct snd_ratnum clocks[2] = {
        {
                .num = 795444,
                .den_min = 1,
@@ -305,7 +305,7 @@ static struct snd_ratnum clocks[2] = {
        }
 };
 
-static struct snd_pcm_hw_constraint_ratnums hw_constraints_clocks  = {
+static const struct snd_pcm_hw_constraint_ratnums hw_constraints_clocks  = {
        .nrats = 2,
        .rats = clocks,
 };