ASoC: intel: byt: Constify hw_constraints
authorTakashi Iwai <tiwai@suse.de>
Thu, 8 Jun 2017 21:37:22 +0000 (23:37 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 13 Jun 2017 20:29:37 +0000 (21:29 +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: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/boards/bytcht_nocodec.c
sound/soc/intel/boards/bytcr_rt5651.c

index 89853eeaaf9dd4f20bdcd61acc10e43c3eb29839..1dd9441806fa31d02c7d3808a35d2d3e8fd304f1 100644 (file)
@@ -85,11 +85,11 @@ static int codec_fixup(struct snd_soc_pcm_runtime *rtd,
        return 0;
 }
 
-static unsigned int rates_48000[] = {
+static const unsigned int rates_48000[] = {
        48000,
 };
 
-static struct snd_pcm_hw_constraint_list constraints_48000 = {
+static const struct snd_pcm_hw_constraint_list constraints_48000 = {
        .count = ARRAY_SIZE(rates_48000),
        .list  = rates_48000,
 };
index 8164bec63bf15b874da49a4406ae9f6124cd776c..4a3516b38c2c9727f7138054cee367ab5ede1205 100644 (file)
@@ -203,11 +203,11 @@ static int byt_rt5651_codec_fixup(struct snd_soc_pcm_runtime *rtd,
        return 0;
 }
 
-static unsigned int rates_48000[] = {
+static const unsigned int rates_48000[] = {
        48000,
 };
 
-static struct snd_pcm_hw_constraint_list constraints_48000 = {
+static const struct snd_pcm_hw_constraint_list constraints_48000 = {
        .count = ARRAY_SIZE(rates_48000),
        .list  = rates_48000,
 };