Skip to content

Commit ab85c44

Browse files
krzkbroonie
authored andcommitted
ASoC: SOF: imx8: 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 <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-8-e553fe67ae82@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 04f2f51 commit ab85c44

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

sound/soc/sof/imx/imx8.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ static int imx8_dsp_set_power_state(struct snd_sof_dev *sdev,
478478
}
479479

480480
/* i.MX8 ops */
481-
static struct snd_sof_dsp_ops sof_imx8_ops = {
481+
static const struct snd_sof_dsp_ops sof_imx8_ops = {
482482
/* probe and remove */
483483
.probe = imx8_probe,
484484
.remove = imx8_remove,
@@ -539,7 +539,7 @@ static struct snd_sof_dsp_ops sof_imx8_ops = {
539539
};
540540

541541
/* i.MX8X ops */
542-
static struct snd_sof_dsp_ops sof_imx8x_ops = {
542+
static const struct snd_sof_dsp_ops sof_imx8x_ops = {
543543
/* probe and remove */
544544
.probe = imx8_probe,
545545
.remove = imx8_remove,

0 commit comments

Comments
 (0)