ALSA: es1938: Constify hw_constraints

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>
This commit is contained in:
Takashi Iwai 2017-06-07 14:19:56 +02:00
parent 8130829a9b
commit 44d715074d
1 changed files with 2 additions and 2 deletions

View File

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