Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ALSA: sparc: Constify snd_kcontrol_new items

Most of snd_kcontrol_new definitions are read-only and passed as-is.
Let's declare them as const for further optimization.

There should be no functional changes by this patch.

Link: https://lore.kernel.org/r/20200103081714.9560-40-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>

+3 -3
+1 -1
sound/sparc/amd7930.c
··· 837 837 return change; 838 838 } 839 839 840 - static struct snd_kcontrol_new amd7930_controls[] = { 840 + static const struct snd_kcontrol_new amd7930_controls[] = { 841 841 { 842 842 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 843 843 .name = "Monitor Volume",
+1 -1
sound/sparc/cs4231.c
··· 1479 1479 .private_value = (left_reg) | ((right_reg) << 8) | ((shift_left) << 16) | \ 1480 1480 ((shift_right) << 19) | ((mask) << 24) | ((invert) << 22) } 1481 1481 1482 - static struct snd_kcontrol_new snd_cs4231_controls[] = { 1482 + static const struct snd_kcontrol_new snd_cs4231_controls[] = { 1483 1483 CS4231_DOUBLE("PCM Playback Switch", 0, CS4231_LEFT_OUTPUT, 1484 1484 CS4231_RIGHT_OUTPUT, 7, 7, 1, 1), 1485 1485 CS4231_DOUBLE("PCM Playback Volume", 0, CS4231_LEFT_OUTPUT,
+1 -1
sound/sparc/dbri.c
··· 2410 2410 .private_value = (entry) | ((shift) << 8) | ((mask) << 16) | \ 2411 2411 ((invert) << 24) }, 2412 2412 2413 - static struct snd_kcontrol_new dbri_controls[] = { 2413 + static const struct snd_kcontrol_new dbri_controls[] = { 2414 2414 { 2415 2415 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 2416 2416 .name = "Playback Volume",