Skip to content

Commit

Permalink
ALSA: fireface: make read-only const array for model names static
Browse files Browse the repository at this point in the history
It is preferable not to populate the constant array for constant strings
on the stack.

Signed-off-by: Takashi Sakamoto <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
takaswie authored and tiwai committed Jun 28, 2023
1 parent d17f0ce commit a64db0b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/firewire/fireface/ff.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ MODULE_LICENSE("GPL");
static void name_card(struct snd_ff *ff)
{
struct fw_device *fw_dev = fw_parent_device(ff->unit);
const char *const names[] = {
static const char *const names[] = {
[SND_FF_UNIT_VERSION_FF800] = "Fireface800",
[SND_FF_UNIT_VERSION_FF400] = "Fireface400",
[SND_FF_UNIT_VERSION_UFX] = "FirefaceUFX",
Expand Down

0 comments on commit a64db0b

Please sign in to comment.