]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
ALSA: es1938: Constify hw_constraints
authorTakashi Iwai <tiwai@suse.de>
Wed, 7 Jun 2017 12:19:56 +0000 (14:19 +0200)
committerTakashi Iwai <tiwai@suse.de>
Fri, 9 Jun 2017 08:42:52 +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/es1938.c

index a544cd52f73a4b388949130a0975ab1c4575beb8..069902a06f00f1aa1dea70c8a9588dba196f7eb6 100644 (file)
@@ -436,7 +436,7 @@ static void snd_es1938_reset_fifo(struct es1938 *chip)
        outb(0, SLSB_REG(chip, RESET));
 }
 
-static struct snd_ratnum clocks[2] = {
+static const struct snd_ratnum clocks[2] = {
        {
                .num = 793800,
                .den_min = 1,
@@ -451,7 +451,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,
 };