ASoC: intel: boards: bytcht*: Constify static snd_soc_ops
authorRikard Falkeborn <rikard.falkeborn@gmail.com>
Sat, 27 Nov 2021 09:19:54 +0000 (10:19 +0100)
committerMark Brown <broonie@kernel.org>
Tue, 30 Nov 2021 13:08:10 +0000 (13:08 +0000)
These are only assigned to the ops fields in the snd_soc_dai_link struct
which is a pointer to const struct snd_soc_ops. Make them const to allow
the compiler to put them in read-only memory.

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20211127091954.12075-1-rikard.falkeborn@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/boards/bytcht_cx2072x.c
sound/soc/intel/boards/bytcht_nocodec.c

index 0a736308052a951824ca9c227bfff373235a7c4b..ffd497a5b5a5febd660a234dbfd428199e362c2f 100644 (file)
@@ -147,7 +147,7 @@ static int byt_cht_cx2072x_aif1_startup(struct snd_pcm_substream *substream)
                                            SNDRV_PCM_HW_PARAM_RATE, 48000);
 }
 
-static struct snd_soc_ops byt_cht_cx2072x_aif1_ops = {
+static const struct snd_soc_ops byt_cht_cx2072x_aif1_ops = {
        .startup = byt_cht_cx2072x_aif1_startup,
 };
 
index 67b3c4e9786402db83fb313f35f184b3a76dcdae..115c2bcaabd4fd4e2285117ac692aa0a92a4dd0a 100644 (file)
@@ -93,7 +93,7 @@ static int aif1_startup(struct snd_pcm_substream *substream)
                        &constraints_48000);
 }
 
-static struct snd_soc_ops aif1_ops = {
+static const struct snd_soc_ops aif1_ops = {
        .startup = aif1_startup,
 };