diff options
author | Mark Brown <broonie@kernel.org> | 2024-04-30 23:34:51 +0900 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-04-30 23:34:51 +0900 |
commit | 228132b4d848cf4318f7df8b9c0ad39e22ca6039 (patch) | |
tree | ecef69770c460852913abaa7b1ad08e14844cd81 /sound/soc/sof/amd/acp-common.c | |
parent | af2ab6ccb93fb4031d15022a1f60904450a9517a (diff) | |
parent | 8b6d678fede700db6466d73f11fcbad496fa515e (diff) |
ASoC: Constify local snd_sof_dsp_ops
Merge series from Krzysztof Kozlowski <krzk@kernel.org>:
The core code does not modify the 'struct snd_sof_dsp_ops' passed via
pointer in various places, so this can be made pointer to const in few
places. This in turn allows few drivers to have the local (usually
static) 'struct snd_sof_dsp_ops' as const which increased code safety,
as it is now part of rodata.
Not all drivers can be made safer that way. Intel and AMD rely on
customizing that 'struct snd_sof_dsp_ops' before passing to SOF, so they
won't benefit. They don't lose anything., either.
Diffstat (limited to 'sound/soc/sof/amd/acp-common.c')
-rw-r--r-- | sound/soc/sof/amd/acp-common.c | 2 |
1 files changed, 1 insertions, 1 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, |