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

ALSA: Constify snd_timer_hardware definitions

Most of snd_timer_hardware definitions do simply copying to another
struct as-is. Mark them as const for further optimization.

There should be no functional changes by this patch.

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

+8 -8
+2 -2
sound/drivers/opl3/opl3_lib.c
··· 214 214 215 215 */ 216 216 217 - static struct snd_timer_hardware snd_opl3_timer1 = 217 + static const struct snd_timer_hardware snd_opl3_timer1 = 218 218 { 219 219 .flags = SNDRV_TIMER_HW_STOP, 220 220 .resolution = 80000, ··· 223 223 .stop = snd_opl3_timer1_stop, 224 224 }; 225 225 226 - static struct snd_timer_hardware snd_opl3_timer2 = 226 + static const struct snd_timer_hardware snd_opl3_timer2 = 227 227 { 228 228 .flags = SNDRV_TIMER_HW_STOP, 229 229 .resolution = 320000,
+2 -2
sound/isa/gus/gus_timer.c
··· 108 108 109 109 */ 110 110 111 - static struct snd_timer_hardware snd_gf1_timer1 = 111 + static const struct snd_timer_hardware snd_gf1_timer1 = 112 112 { 113 113 .flags = SNDRV_TIMER_HW_STOP, 114 114 .resolution = 80000, ··· 117 117 .stop = snd_gf1_timer1_stop, 118 118 }; 119 119 120 - static struct snd_timer_hardware snd_gf1_timer2 = 120 + static const struct snd_timer_hardware snd_gf1_timer2 = 121 121 { 122 122 .flags = SNDRV_TIMER_HW_STOP, 123 123 .resolution = 320000,
+1 -1
sound/isa/wss/wss_lib.c
··· 961 961 return 0; 962 962 } 963 963 964 - static struct snd_timer_hardware snd_wss_timer_table = 964 + static const struct snd_timer_hardware snd_wss_timer_table = 965 965 { 966 966 .flags = SNDRV_TIMER_HW_AUTO, 967 967 .resolution = 9945,
+1 -1
sound/pci/emu10k1/timer.c
··· 52 52 return 0; 53 53 } 54 54 55 - static struct snd_timer_hardware snd_emu10k1_timer_hw = { 55 + static const struct snd_timer_hardware snd_emu10k1_timer_hw = { 56 56 .flags = SNDRV_TIMER_HW_AUTO, 57 57 .resolution = 20833, /* 1 sample @ 48KHZ = 20.833...us */ 58 58 .ticks = 1024,
+1 -1
sound/pci/ymfpci/ymfpci_main.c
··· 1908 1908 return 0; 1909 1909 } 1910 1910 1911 - static struct snd_timer_hardware snd_ymfpci_timer_hw = { 1911 + static const struct snd_timer_hardware snd_ymfpci_timer_hw = { 1912 1912 .flags = SNDRV_TIMER_HW_AUTO, 1913 1913 .resolution = 10417, /* 1 / 96 kHz = 10.41666...us */ 1914 1914 .ticks = 0x10000,
+1 -1
sound/sparc/cs4231.c
··· 869 869 return 0; 870 870 } 871 871 872 - static struct snd_timer_hardware snd_cs4231_timer_table = { 872 + static const struct snd_timer_hardware snd_cs4231_timer_table = { 873 873 .flags = SNDRV_TIMER_HW_AUTO, 874 874 .resolution = 9945, 875 875 .ticks = 65535,