diff options
author | Krzysztof Kozlowski <krzk@kernel.org> | 2024-04-26 12:03:51 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-04-29 18:16:49 +0300 |
commit | 8bbc692d1abce5bc949dea9acba85fc686601c04 (patch) | |
tree | c8851216c28a6c96e9a7685775c6aa6e42e52ee9 /include/sound | |
parent | a0db037df9630edad76153c7937c6f5ca04ed44f (diff) | |
download | linux-8bbc692d1abce5bc949dea9acba85fc686601c04.tar.xz |
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')
-rw-r--r-- | include/sound/sof.h | 2 |
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); }; |