summaryrefslogtreecommitdiffstats
path: root/include/sound/sof.h
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzk@kernel.org>2024-04-26 11:03:51 +0200
committerMark Brown <broonie@kernel.org>2024-04-30 00:16:49 +0900
commit8bbc692d1abce5bc949dea9acba85fc686601c04 (patch)
treec8851216c28a6c96e9a7685775c6aa6e42e52ee9 /include/sound/sof.h
parenta0db037df9630edad76153c7937c6f5ca04ed44f (diff)
downloadlinux-8bbc692d1abce5bc949dea9acba85fc686601c04.tar.gz
linux-8bbc692d1abce5bc949dea9acba85fc686601c04.tar.bz2
linux-8bbc692d1abce5bc949dea9acba85fc686601c04.zip
ASoC: SOF: Constify stored pointer to snd_sof_dsp_ops
The core code does not modify the 'struct snd_sof_dsp_ops', stored in 'struct sof_dev_desc'. Make the pointer to 'struct snd_sof_dsp_ops' const to annotate this, make code a bit safer and allow individual drivers to also define this structure as const. 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-4-e553fe67ae82@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/sound/sof.h')
-rw-r--r--include/sound/sof.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/sound/sof.h b/include/sound/sof.h
index 05213bb515a3..780c1a755917 100644
--- a/include/sound/sof.h
+++ b/include/sound/sof.h
@@ -166,7 +166,7 @@ struct sof_dev_desc {
/* default firmware name */
const char *default_fw_filename[SOF_IPC_TYPE_COUNT];
- struct snd_sof_dsp_ops *ops;
+ const struct snd_sof_dsp_ops *ops;
int (*ops_init)(struct snd_sof_dev *sdev);
void (*ops_free)(struct snd_sof_dev *sdev);
};