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

ALSA: timer: 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-21-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>

+2 -2
+1 -1
sound/core/pcm_timer.c
··· 75 75 return 0; 76 76 } 77 77 78 - static struct snd_timer_hardware snd_pcm_timer = 78 + static const struct snd_timer_hardware snd_pcm_timer = 79 79 { 80 80 .flags = SNDRV_TIMER_HW_AUTO | SNDRV_TIMER_HW_SLAVE, 81 81 .resolution = 0,
+1 -1
sound/core/timer.c
··· 1199 1199 return 0; 1200 1200 } 1201 1201 1202 - static struct snd_timer_hardware snd_timer_system = 1202 + static const struct snd_timer_hardware snd_timer_system = 1203 1203 { 1204 1204 .flags = SNDRV_TIMER_HW_FIRST | SNDRV_TIMER_HW_TASKLET, 1205 1205 .resolution = 1000000000L / HZ,