Skip to content

Commit 8f2b0d5

Browse files
krzkbroonie
authored andcommitted
ASoC: SOF: intel: pci-tng: 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 8bbc692 commit 8f2b0d5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

sound/soc/sof/intel/pci-tng.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ static int tangier_pci_probe(struct snd_sof_dev *sdev)
132132
return ret;
133133
}
134134

135-
struct snd_sof_dsp_ops sof_tng_ops = {
135+
const struct snd_sof_dsp_ops sof_tng_ops = {
136136
/* device init */
137137
.probe = tangier_pci_probe,
138138

sound/soc/sof/intel/shim.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ struct sof_intel_dsp_desc {
196196
int (*cl_init)(struct snd_sof_dev *sdev, int stream_tag, bool imr_boot);
197197
};
198198

199-
extern struct snd_sof_dsp_ops sof_tng_ops;
199+
extern const struct snd_sof_dsp_ops sof_tng_ops;
200200

201201
extern const struct sof_intel_dsp_desc tng_chip_info;
202202

0 commit comments

Comments
 (0)