Skip to content

Commit 8752d9a

Browse files
rikardfalkebornbroonie
authored andcommitted
ASoC: mediatek: mt8195: Constify static snd_soc_ops
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>
1 parent 7be10ce commit 8752d9a

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

sound/soc/mediatek/mt8195/mt8195-mt6359-rt1011-rt5682.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ static int mt8195_dptx_hw_params(struct snd_pcm_substream *substream,
421421
SND_SOC_CLOCK_OUT);
422422
}
423423

424-
static struct snd_soc_ops mt8195_dptx_ops = {
424+
static const struct snd_soc_ops mt8195_dptx_ops = {
425425
.hw_params = mt8195_dptx_hw_params,
426426
};
427427

sound/soc/mediatek/mt8195/mt8195-mt6359-rt1019-rt5682.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ static int mt8195_dptx_hw_params(struct snd_pcm_substream *substream,
391391
SND_SOC_CLOCK_OUT);
392392
}
393393

394-
static struct snd_soc_ops mt8195_dptx_ops = {
394+
static const struct snd_soc_ops mt8195_dptx_ops = {
395395
.hw_params = mt8195_dptx_hw_params,
396396
};
397397

0 commit comments

Comments
 (0)