ASoC: SOF: ipc3: Constify local snd_sof_dsp_ops
authorKrzysztof Kozlowski <krzk@kernel.org>
Fri, 26 Apr 2024 09:03:49 +0000 (11:03 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 29 Apr 2024 15:16:48 +0000 (00:16 +0900)
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>
sound/soc/sof/ipc3-priv.h

index 0bbca418e67e680db9a2d93fc30e1180f76e0376..9cd7794f3cb69b140c1205e1f94711abdb37e6af 100644 (file)
@@ -36,7 +36,7 @@ static inline int sof_dtrace_host_init(struct snd_sof_dev *sdev,
                                       struct snd_dma_buffer *dmatb,
                                       struct sof_ipc_dma_trace_params_ext *dtrace_params)
 {
-       struct snd_sof_dsp_ops *dsp_ops = sdev->pdata->desc->ops;
+       const struct snd_sof_dsp_ops *dsp_ops = sdev->pdata->desc->ops;
 
        if (dsp_ops->trace_init)
                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,
 
 static inline int sof_dtrace_host_release(struct snd_sof_dev *sdev)
 {
-       struct snd_sof_dsp_ops *dsp_ops = sdev->pdata->desc->ops;
+       const struct snd_sof_dsp_ops *dsp_ops = sdev->pdata->desc->ops;
 
        if (dsp_ops->trace_release)
                return dsp_ops->trace_release(sdev);
@@ -56,7 +56,7 @@ static inline int sof_dtrace_host_release(struct snd_sof_dev *sdev)
 
 static inline int sof_dtrace_host_trigger(struct snd_sof_dev *sdev, int cmd)
 {
-       struct snd_sof_dsp_ops *dsp_ops = sdev->pdata->desc->ops;
+       const struct snd_sof_dsp_ops *dsp_ops = sdev->pdata->desc->ops;
 
        if (dsp_ops->trace_trigger)
                return dsp_ops->trace_trigger(sdev, cmd);