diff options
author | Takashi Iwai <tiwai@suse.de> | 2017-06-07 08:12:16 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2017-06-09 04:42:46 -0400 |
commit | 0adaf3bea166d21dfd420b8628ca74adf15d75f8 (patch) | |
tree | 114c5568389b5f90841a28eae106a9a722bfb876 /sound/isa | |
parent | bf8334845598a172b42ee487b05eb4394c86bce8 (diff) |
ALSA: cs423x: 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>
Diffstat (limited to 'sound/isa')
-rw-r--r-- | sound/isa/cs423x/cs4236_lib.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/isa/cs423x/cs4236_lib.c b/sound/isa/cs423x/cs4236_lib.c index 2b7cc596f4c6..2012936f6756 100644 --- a/sound/isa/cs423x/cs4236_lib.c +++ b/sound/isa/cs423x/cs4236_lib.c | |||
@@ -138,7 +138,7 @@ static unsigned char snd_cs4236_ctrl_in(struct snd_wss *chip, unsigned char reg) | |||
138 | 138 | ||
139 | #define CLOCKS 8 | 139 | #define CLOCKS 8 |
140 | 140 | ||
141 | static struct snd_ratnum clocks[CLOCKS] = { | 141 | static const struct snd_ratnum clocks[CLOCKS] = { |
142 | { .num = 16934400, .den_min = 353, .den_max = 353, .den_step = 1 }, | 142 | { .num = 16934400, .den_min = 353, .den_max = 353, .den_step = 1 }, |
143 | { .num = 16934400, .den_min = 529, .den_max = 529, .den_step = 1 }, | 143 | { .num = 16934400, .den_min = 529, .den_max = 529, .den_step = 1 }, |
144 | { .num = 16934400, .den_min = 617, .den_max = 617, .den_step = 1 }, | 144 | { .num = 16934400, .den_min = 617, .den_max = 617, .den_step = 1 }, |
@@ -149,7 +149,7 @@ static struct snd_ratnum clocks[CLOCKS] = { | |||
149 | { .num = 16934400/16, .den_min = 21, .den_max = 192, .den_step = 1 } | 149 | { .num = 16934400/16, .den_min = 21, .den_max = 192, .den_step = 1 } |
150 | }; | 150 | }; |
151 | 151 | ||
152 | static struct snd_pcm_hw_constraint_ratnums hw_constraints_clocks = { | 152 | static const struct snd_pcm_hw_constraint_ratnums hw_constraints_clocks = { |
153 | .nrats = CLOCKS, | 153 | .nrats = CLOCKS, |
154 | .rats = clocks, | 154 | .rats = clocks, |
155 | }; | 155 | }; |