Commit e51c001f authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Mark Brown

ASoC: Intel: avs: Constify struct snd_soc_tplg_ops

Constifying "struct snd_soc_tplg_ops" moves some data to a read-only
section, so increase overall security.

On a x86_64, with allmodconfig:
Before:
   text	   data	    bss	    dec	    hex	filename
  28046	    794	      0	  28840	   70a8	sound/soc/intel/avs/topology.o

After:
   text	   data	    bss	    dec	    hex	filename
  28206	    614	      0	  28820	   7094	sound/soc/intel/avs/topology.o
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: default avatarAmadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://msgid.link/r/01de0157088de0475970c79738284d6c86d702fe.1715526069.git.christophe.jaillet@wanadoo.frSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 73444768
......@@ -1889,7 +1889,7 @@ avs_control_load(struct snd_soc_component *comp, int index, struct snd_kcontrol_
return 0;
}
static struct snd_soc_tplg_ops avs_tplg_ops = {
static const struct snd_soc_tplg_ops avs_tplg_ops = {
.io_ops = avs_control_ops,
.io_ops_count = ARRAY_SIZE(avs_control_ops),
.control_load = avs_control_load,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment