Skip to content

Commit 6032eef

Browse files
krzkbroonie
authored andcommitted
ASoC: SOF: intel: hda: 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 <[email protected]> Signed-off-by: Krzysztof Kozlowski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 8f2b0d5 commit 6032eef

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

sound/soc/sof/intel/hda-common-ops.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include "hda.h"
1515
#include "../sof-audio.h"
1616

17-
struct snd_sof_dsp_ops sof_hda_common_ops = {
17+
const struct snd_sof_dsp_ops sof_hda_common_ops = {
1818
/* probe/remove/shutdown */
1919
.probe_early = hda_dsp_probe_early,
2020
.probe = hda_dsp_probe,

sound/soc/sof/intel/hda.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,7 @@ int hda_dsp_dais_suspend(struct snd_sof_dev *sdev);
874874
/*
875875
* Platform Specific HW abstraction Ops.
876876
*/
877-
extern struct snd_sof_dsp_ops sof_hda_common_ops;
877+
extern const struct snd_sof_dsp_ops sof_hda_common_ops;
878878

879879
extern struct snd_sof_dsp_ops sof_skl_ops;
880880
int sof_skl_ops_init(struct snd_sof_dev *sdev);

0 commit comments

Comments
 (0)