ASoC: mediatek: Constify hw_constraints
authorTakashi Iwai <tiwai@suse.de>
Thu, 8 Jun 2017 21:37:24 +0000 (23:37 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 13 Jun 2017 20:33:03 +0000 (21:33 +0100)
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>
Acked-By: Matthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/mediatek/mt2701/mt2701-cs42448.c

index aa5b31b..70f61d5 100644 (file)
@@ -107,7 +107,7 @@ static const struct snd_kcontrol_new mt2701_cs42448_controls[] = {
 
 static const unsigned int mt2701_cs42448_sampling_rates[] = {48000};
 
-static struct snd_pcm_hw_constraint_list mt2701_cs42448_constraints_rates = {
+static const struct snd_pcm_hw_constraint_list mt2701_cs42448_constraints_rates = {
                .count = ARRAY_SIZE(mt2701_cs42448_sampling_rates),
                .list = mt2701_cs42448_sampling_rates,
                .mask = 0,