diff options
author | Takashi Iwai <tiwai@suse.de> | 2017-06-07 08:18:33 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2017-06-09 04:42:50 -0400 |
commit | 934cd5b76d6fb5bbdefd37815a2b9441eb09d02f (patch) | |
tree | c9a91f307b7989ce271ede8bc253a6870e36bf03 | |
parent | 3e2fd04f89e5d38c8df3c4b6dba771f2c46a8f44 (diff) |
ALSA: bt87x: 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>
-rw-r--r-- | sound/pci/bt87x.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/pci/bt87x.c b/sound/pci/bt87x.c index 099efb046b1c..de0234294c25 100644 --- a/sound/pci/bt87x.c +++ b/sound/pci/bt87x.c | |||
@@ -401,13 +401,13 @@ static int snd_bt87x_set_digital_hw(struct snd_bt87x *chip, struct snd_pcm_runti | |||
401 | 401 | ||
402 | static int snd_bt87x_set_analog_hw(struct snd_bt87x *chip, struct snd_pcm_runtime *runtime) | 402 | static int snd_bt87x_set_analog_hw(struct snd_bt87x *chip, struct snd_pcm_runtime *runtime) |
403 | { | 403 | { |
404 | static struct snd_ratnum analog_clock = { | 404 | static const struct snd_ratnum analog_clock = { |
405 | .num = ANALOG_CLOCK, | 405 | .num = ANALOG_CLOCK, |
406 | .den_min = CLOCK_DIV_MIN, | 406 | .den_min = CLOCK_DIV_MIN, |
407 | .den_max = CLOCK_DIV_MAX, | 407 | .den_max = CLOCK_DIV_MAX, |
408 | .den_step = 1 | 408 | .den_step = 1 |
409 | }; | 409 | }; |
410 | static struct snd_pcm_hw_constraint_ratnums constraint_rates = { | 410 | static const struct snd_pcm_hw_constraint_ratnums constraint_rates = { |
411 | .nrats = 1, | 411 | .nrats = 1, |
412 | .rats = &analog_clock | 412 | .rats = &analog_clock |
413 | }; | 413 | }; |