From: Takashi Iwai Date: Wed, 7 Jun 2017 12:16:25 +0000 (+0200) Subject: ALSA: gus: Constify hw_constraints X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=bfa516a109ae77dae34b69f36d09b8f9d329384b;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git ALSA: gus: 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 --- diff --git a/sound/isa/gus/gus_pcm.c b/sound/isa/gus/gus_pcm.c index b9f6dcbef889..6b3da01a93b7 100644 --- a/sound/isa/gus/gus_pcm.c +++ b/sound/isa/gus/gus_pcm.c @@ -562,14 +562,14 @@ static snd_pcm_uframes_t snd_gf1_pcm_playback_pointer(struct snd_pcm_substream * return pos; } -static struct snd_ratnum clock = { +static const struct snd_ratnum clock = { .num = 9878400/16, .den_min = 2, .den_max = 257, .den_step = 1, }; -static struct snd_pcm_hw_constraint_ratnums hw_constraints_clocks = { +static const struct snd_pcm_hw_constraint_ratnums hw_constraints_clocks = { .nrats = 1, .rats = &clock, };