ASoC: intel: boards: bytcht*: Constify static snd_soc_ops

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>
This commit is contained in:
Rikard Falkeborn 2021-11-27 10:19:54 +01:00 committed by Mark Brown
parent 11918cdcff
commit 10b155fd41
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
2 changed files with 2 additions and 2 deletions

View 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,
};

View 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,
};