summaryrefslogtreecommitdiffstats
path: root/sound/soc/sof
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzk@kernel.org>2024-04-26 11:03:54 +0200
committerMark Brown <broonie@kernel.org>2024-04-30 00:16:52 +0900
commit04f2f516be09d5493d764e0020a771c46b5470d8 (patch)
tree8c46119d2999a819ed412cd55cb64ce11b36eba0 /sound/soc/sof
parent6032eefc2c478243a511352dda04495c9a9fec6a (diff)
downloadlinux-stable-04f2f516be09d5493d764e0020a771c46b5470d8.tar.gz
linux-stable-04f2f516be09d5493d764e0020a771c46b5470d8.tar.bz2
linux-stable-04f2f516be09d5493d764e0020a771c46b5470d8.zip
ASoC: SOF: amd: acp: Constify snd_sof_dsp_ops
'struct snd_sof_dsp_ops' is not modified by core code, so it can be made const for increased code safety. Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20240426-n-const-ops-var-v2-7-e553fe67ae82@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof')
-rw-r--r--sound/soc/sof/amd/acp-common.c2
-rw-r--r--sound/soc/sof/amd/acp.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/sof/amd/acp-common.c b/sound/soc/sof/amd/acp-common.c
index 0fc4e20ec673..b26fa471b431 100644
--- a/sound/soc/sof/amd/acp-common.c
+++ b/sound/soc/sof/amd/acp-common.c
@@ -193,7 +193,7 @@ struct snd_soc_acpi_mach *amd_sof_machine_select(struct snd_sof_dev *sdev)
}
/* AMD Common DSP ops */
-struct snd_sof_dsp_ops sof_acp_common_ops = {
+const struct snd_sof_dsp_ops sof_acp_common_ops = {
/* probe and remove */
.probe = amd_sof_acp_probe,
.remove = amd_sof_acp_remove,
diff --git a/sound/soc/sof/amd/acp.h b/sound/soc/sof/amd/acp.h
index e229bb6b849d..87e79d500865 100644
--- a/sound/soc/sof/amd/acp.h
+++ b/sound/soc/sof/amd/acp.h
@@ -310,7 +310,7 @@ int acp_pcm_hw_params(struct snd_sof_dev *sdev, struct snd_pcm_substream *substr
snd_pcm_uframes_t acp_pcm_pointer(struct snd_sof_dev *sdev,
struct snd_pcm_substream *substream);
-extern struct snd_sof_dsp_ops sof_acp_common_ops;
+extern const struct snd_sof_dsp_ops sof_acp_common_ops;
extern struct snd_sof_dsp_ops sof_renoir_ops;
int sof_renoir_ops_init(struct snd_sof_dev *sdev);