ASoC: SOF: intel: byt: Constify snd_sof_dsp_ops
authorKrzysztof Kozlowski <krzk@kernel.org>
Fri, 26 Apr 2024 09:03:59 +0000 (11:03 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 29 Apr 2024 15:16:56 +0000 (00:16 +0900)
'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-12-e553fe67ae82@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/intel/byt.c

index 373527b206d7bad4e87840173058e32708218112..14a065999a8959ebdba5d49f6e8381cb3266567f 100644 (file)
@@ -214,7 +214,7 @@ irq:
 }
 
 /* baytrail ops */
-static struct snd_sof_dsp_ops sof_byt_ops = {
+static const struct snd_sof_dsp_ops sof_byt_ops = {
        /* device init */
        .probe          = byt_acpi_probe,
        .remove         = byt_remove,
@@ -289,7 +289,7 @@ static const struct sof_intel_dsp_desc byt_chip_info = {
 };
 
 /* cherrytrail and braswell ops */
-static struct snd_sof_dsp_ops sof_cht_ops = {
+static const struct snd_sof_dsp_ops sof_cht_ops = {
        /* device init */
        .probe          = byt_acpi_probe,
        .remove         = byt_remove,