Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 934cd5b7 authored by Takashi Iwai's avatar Takashi Iwai
Browse files

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: default avatarTakashi Iwai <tiwai@suse.de>
parent 3e2fd04f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -401,13 +401,13 @@ static int snd_bt87x_set_digital_hw(struct snd_bt87x *chip, struct snd_pcm_runti

static int snd_bt87x_set_analog_hw(struct snd_bt87x *chip, struct snd_pcm_runtime *runtime)
{
	static struct snd_ratnum analog_clock = {
	static const struct snd_ratnum analog_clock = {
		.num = ANALOG_CLOCK,
		.den_min = CLOCK_DIV_MIN,
		.den_max = CLOCK_DIV_MAX,
		.den_step = 1
	};
	static struct snd_pcm_hw_constraint_ratnums constraint_rates = {
	static const struct snd_pcm_hw_constraint_ratnums constraint_rates = {
		.nrats = 1,
		.rats = &analog_clock
	};