Skip to content

Commit 8bbc692

Browse files
krzkbroonie
authored andcommitted
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 <[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 a0db037 commit 8bbc692

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/sound/sof.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ struct sof_dev_desc {
166166
/* default firmware name */
167167
const char *default_fw_filename[SOF_IPC_TYPE_COUNT];
168168

169-
struct snd_sof_dsp_ops *ops;
169+
const struct snd_sof_dsp_ops *ops;
170170
int (*ops_init)(struct snd_sof_dev *sdev);
171171
void (*ops_free)(struct snd_sof_dev *sdev);
172172
};

0 commit comments

Comments
 (0)