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

ALSA: ca0106: Constify snd_ca0106_details

The snd_ca0106_details table entries are referred only as read-only.
Let's make them const.

There should be no functional changes by this patch.

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

+5 -5
+1 -1
sound/pci/ca0106/ca0106.h
··· 663 663 // definition of the chip-specific record 664 664 struct snd_ca0106 { 665 665 struct snd_card *card; 666 - struct snd_ca0106_details *details; 666 + const struct snd_ca0106_details *details; 667 667 struct pci_dev *pci; 668 668 669 669 unsigned long port;
+3 -3
sound/pci/ca0106/ca0106_main.c
··· 156 156 157 157 #include "ca0106.h" 158 158 159 - static struct snd_ca0106_details ca0106_chip_details[] = { 159 + static const struct snd_ca0106_details ca0106_chip_details[] = { 160 160 /* Sound Blaster X-Fi Extreme Audio. This does not have an AC97. 53SB079000000 */ 161 161 /* It is really just a normal SB Live 24bit. */ 162 162 /* Tested: ··· 503 503 } 504 504 505 505 static int snd_ca0106_channel_dac(struct snd_ca0106 *chip, 506 - struct snd_ca0106_details *details, 506 + const struct snd_ca0106_details *details, 507 507 int channel_id) 508 508 { 509 509 switch (channel_id) { ··· 1593 1593 struct snd_ca0106 **rchip) 1594 1594 { 1595 1595 struct snd_ca0106 *chip; 1596 - struct snd_ca0106_details *c; 1596 + const struct snd_ca0106_details *c; 1597 1597 int err; 1598 1598 static const struct snd_device_ops ops = { 1599 1599 .dev_free = snd_ca0106_dev_free,
+1 -1
sound/pci/ca0106/ca0106_mixer.c
··· 654 654 }; 655 655 656 656 static struct snd_kcontrol_new 657 - snd_ca0106_volume_spi_dac_ctl(struct snd_ca0106_details *details, 657 + snd_ca0106_volume_spi_dac_ctl(const struct snd_ca0106_details *details, 658 658 int channel_id) 659 659 { 660 660 struct snd_kcontrol_new spi_switch = {0};