Skip to content

Commit ee5acc1

Browse files
krzkbroonie
authored andcommitted
ASoC: SOF: ipc3: Constify local snd_sof_dsp_ops
Constify the pointer to 'struct snd_sof_dsp_ops' to annotate that functioon does not modify pointed data. 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-2-e553fe67ae82@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent ffca099 commit ee5acc1

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

sound/soc/sof/ipc3-priv.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ static inline int sof_dtrace_host_init(struct snd_sof_dev *sdev,
3636
struct snd_dma_buffer *dmatb,
3737
struct sof_ipc_dma_trace_params_ext *dtrace_params)
3838
{
39-
struct snd_sof_dsp_ops *dsp_ops = sdev->pdata->desc->ops;
39+
const struct snd_sof_dsp_ops *dsp_ops = sdev->pdata->desc->ops;
4040

4141
if (dsp_ops->trace_init)
4242
return dsp_ops->trace_init(sdev, dmatb, dtrace_params);
@@ -46,7 +46,7 @@ static inline int sof_dtrace_host_init(struct snd_sof_dev *sdev,
4646

4747
static inline int sof_dtrace_host_release(struct snd_sof_dev *sdev)
4848
{
49-
struct snd_sof_dsp_ops *dsp_ops = sdev->pdata->desc->ops;
49+
const struct snd_sof_dsp_ops *dsp_ops = sdev->pdata->desc->ops;
5050

5151
if (dsp_ops->trace_release)
5252
return dsp_ops->trace_release(sdev);
@@ -56,7 +56,7 @@ static inline int sof_dtrace_host_release(struct snd_sof_dev *sdev)
5656

5757
static inline int sof_dtrace_host_trigger(struct snd_sof_dev *sdev, int cmd)
5858
{
59-
struct snd_sof_dsp_ops *dsp_ops = sdev->pdata->desc->ops;
59+
const struct snd_sof_dsp_ops *dsp_ops = sdev->pdata->desc->ops;
6060

6161
if (dsp_ops->trace_trigger)
6262
return dsp_ops->trace_trigger(sdev, cmd);

0 commit comments

Comments
 (0)