diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2024-01-20 10:42:12 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2024-01-22 13:04:22 +0100 |
commit | 1ac1b4b79bf51edcf4f25a1980334bd467880e7d (patch) | |
tree | ebc22722dec4e8aa8a48dfabbdd59073e0d0de01 /include/sound/emux_synth.h | |
parent | 1513664f340289cf10402753110f3cff12a738aa (diff) | |
download | lwn-1ac1b4b79bf51edcf4f25a1980334bd467880e7d.tar.gz lwn-1ac1b4b79bf51edcf4f25a1980334bd467880e7d.zip |
ALSA: synth: Save a few bytes of memory when registering a 'snd_emux'
snd_emux_register() calls pass a string literal as the 'name' parameter.
So kstrdup_const() can be used instead of kfree() to avoid a memory
allocation in such cases.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/9e7b94c852a25ed4be5382e5e48a7dd77e8d4d1a.1705743706.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/sound/emux_synth.h')
-rw-r--r-- | include/sound/emux_synth.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/sound/emux_synth.h b/include/sound/emux_synth.h index 1cc530434b97..3f7f365ed248 100644 --- a/include/sound/emux_synth.h +++ b/include/sound/emux_synth.h @@ -103,7 +103,7 @@ struct snd_emux { int ports[SNDRV_EMUX_MAX_PORTS]; /* The ports for this device */ struct snd_emux_port *portptrs[SNDRV_EMUX_MAX_PORTS]; int used; /* use counter */ - char *name; /* name of the device (internal) */ + const char *name; /* name of the device (internal) */ struct snd_rawmidi **vmidi; struct timer_list tlist; /* for pending note-offs */ int timer_active; |