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

ALSA: usb: Constify snd_pcm_hardware definitions

Most of snd_pcm_hardware definitions are just copied to another object
as-is, hence we can define them as const for further optimization.

There should be no functional changes by this patch.

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

+3 -3
+1 -1
sound/usb/caiaq/audio.c
··· 30 30 #define MAKE_CHECKBYTE(cdev,stream,i) \ 31 31 (stream << 1) | (~(i / (cdev->n_streams * BYTES_PER_SAMPLE_USB)) & 1) 32 32 33 - static struct snd_pcm_hardware snd_usb_caiaq_pcm_hardware = { 33 + static const struct snd_pcm_hardware snd_usb_caiaq_pcm_hardware = { 34 34 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 35 35 SNDRV_PCM_INFO_BLOCK_TRANSFER), 36 36 .formats = SNDRV_PCM_FMTBIT_S24_3BE,
+1 -1
sound/usb/usx2y/usbusx2yaudio.c
··· 838 838 return err; 839 839 } 840 840 841 - static struct snd_pcm_hardware snd_usX2Y_2c = 841 + static const struct snd_pcm_hardware snd_usX2Y_2c = 842 842 { 843 843 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 844 844 SNDRV_PCM_INFO_BLOCK_TRANSFER |
+1 -1
sound/usb/usx2y/usx2yhwdeppcm.c
··· 528 528 return err; 529 529 } 530 530 531 - static struct snd_pcm_hardware snd_usX2Y_4c = 531 + static const struct snd_pcm_hardware snd_usX2Y_4c = 532 532 { 533 533 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 534 534 SNDRV_PCM_INFO_BLOCK_TRANSFER |