Commit 21709121 authored by Takashi Iwai's avatar Takashi Iwai

ALSA: es18xx: 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: default avatarTakashi Iwai <tiwai@suse.de>
parent 4ea2bb73
...@@ -369,7 +369,7 @@ static int snd_es18xx_reset_fifo(struct snd_es18xx *chip) ...@@ -369,7 +369,7 @@ static int snd_es18xx_reset_fifo(struct snd_es18xx *chip)
return 0; return 0;
} }
static struct snd_ratnum new_clocks[2] = { static const struct snd_ratnum new_clocks[2] = {
{ {
.num = 793800, .num = 793800,
.den_min = 1, .den_min = 1,
...@@ -384,12 +384,12 @@ static struct snd_ratnum new_clocks[2] = { ...@@ -384,12 +384,12 @@ static struct snd_ratnum new_clocks[2] = {
} }
}; };
static struct snd_pcm_hw_constraint_ratnums new_hw_constraints_clocks = { static const struct snd_pcm_hw_constraint_ratnums new_hw_constraints_clocks = {
.nrats = 2, .nrats = 2,
.rats = new_clocks, .rats = new_clocks,
}; };
static struct snd_ratnum old_clocks[2] = { static const struct snd_ratnum old_clocks[2] = {
{ {
.num = 795444, .num = 795444,
.den_min = 1, .den_min = 1,
...@@ -404,7 +404,7 @@ static struct snd_ratnum old_clocks[2] = { ...@@ -404,7 +404,7 @@ static struct snd_ratnum old_clocks[2] = {
} }
}; };
static struct snd_pcm_hw_constraint_ratnums old_hw_constraints_clocks = { static const struct snd_pcm_hw_constraint_ratnums old_hw_constraints_clocks = {
.nrats = 2, .nrats = 2,
.rats = old_clocks, .rats = old_clocks,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment