ASoC: mediatek: mt8195: Constify static snd_soc_ops
authorRikard Falkeborn <rikard.falkeborn@gmail.com>
Sat, 27 Nov 2021 09:31:47 +0000 (10:31 +0100)
committerMark Brown <broonie@kernel.org>
Tue, 30 Nov 2021 13:08:08 +0000 (13:08 +0000)
These are only assigned to the ops field in the snd_soc_dai_link 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>
Link: https://lore.kernel.org/r/20211127093147.17368-1-rikard.falkeborn@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/mediatek/mt8195/mt8195-mt6359-rt1011-rt5682.c
sound/soc/mediatek/mt8195/mt8195-mt6359-rt1019-rt5682.c

index e103102d7ef6d5c649a5aeda61997c09463b896c..9e6b54e19c232f7920616b5b181cc42bf5a74beb 100644 (file)
@@ -421,7 +421,7 @@ static int mt8195_dptx_hw_params(struct snd_pcm_substream *substream,
                                      SND_SOC_CLOCK_OUT);
 }
 
-static struct snd_soc_ops mt8195_dptx_ops = {
+static const struct snd_soc_ops mt8195_dptx_ops = {
        .hw_params = mt8195_dptx_hw_params,
 };
 
index 95abaadcd842079f0252b23f9432bafa19df2ad4..e22e5fd4098464a663da715ebecce8649f0490c8 100644 (file)
@@ -391,7 +391,7 @@ static int mt8195_dptx_hw_params(struct snd_pcm_substream *substream,
                                      SND_SOC_CLOCK_OUT);
 }
 
-static struct snd_soc_ops mt8195_dptx_ops = {
+static const struct snd_soc_ops mt8195_dptx_ops = {
        .hw_params = mt8195_dptx_hw_params,
 };