mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-04 10:56:06 -04:00
ASoC: SOF: topology: 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 44519 2888 48 47455 b95f sound/soc/sof/topology.o After: text data bss dec hex filename 44839 2552 48 47439 b94f sound/soc/sof/topology.o Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://msgid.link/r/2d9f5b75e979eb38b6f3baf85dfa1f0fdb3447ef.1715526069.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
committed by
Mark Brown
parent
9ff6aaf0f7
commit
e9c3391793
@@ -2278,7 +2278,7 @@ static const struct snd_soc_tplg_bytes_ext_ops sof_bytes_ext_ops[] = {
|
||||
{SOF_TPLG_KCTL_BYTES_VOLATILE_RO, snd_sof_bytes_ext_volatile_get},
|
||||
};
|
||||
|
||||
static struct snd_soc_tplg_ops sof_tplg_ops = {
|
||||
static const struct snd_soc_tplg_ops sof_tplg_ops = {
|
||||
/* external kcontrol init - used for any driver specific init */
|
||||
.control_load = sof_control_load,
|
||||
.control_unload = sof_control_unload,
|
||||
@@ -2433,7 +2433,7 @@ static int sof_dspless_link_load(struct snd_soc_component *scomp, int index,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct snd_soc_tplg_ops sof_dspless_tplg_ops = {
|
||||
static const struct snd_soc_tplg_ops sof_dspless_tplg_ops = {
|
||||
/* external widget init - used for any driver specific init */
|
||||
.widget_ready = sof_dspless_widget_ready,
|
||||
.widget_unload = sof_dspless_widget_unload,
|
||||
|
||||
Reference in New Issue
Block a user