ALSA: cmipci: More constifications
Apply const prefix to the static tables for rates, ports and registers. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-37-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
096da809f6
commit
5f3aca1065
|
@ -586,7 +586,7 @@ static int snd_cmipci_clear_bit_b(struct cmipci *cm, unsigned int cmd, unsigned
|
|||
* calculate frequency
|
||||
*/
|
||||
|
||||
static unsigned int rates[] = { 5512, 11025, 22050, 44100, 8000, 16000, 32000, 48000 };
|
||||
static const unsigned int rates[] = { 5512, 11025, 22050, 44100, 8000, 16000, 32000, 48000 };
|
||||
|
||||
static unsigned int snd_cmipci_rate_freq(unsigned int rate)
|
||||
{
|
||||
|
@ -2826,7 +2826,7 @@ static void query_chip(struct cmipci *cm)
|
|||
#ifdef SUPPORT_JOYSTICK
|
||||
static int snd_cmipci_create_gameport(struct cmipci *cm, int dev)
|
||||
{
|
||||
static int ports[] = { 0x201, 0x200, 0 }; /* FIXME: majority is 0x201? */
|
||||
static const int ports[] = { 0x201, 0x200, 0 }; /* FIXME: majority is 0x201? */
|
||||
struct gameport *gp;
|
||||
struct resource *r = NULL;
|
||||
int i, io_port = 0;
|
||||
|
@ -3289,7 +3289,7 @@ static void snd_cmipci_remove(struct pci_dev *pci)
|
|||
/*
|
||||
* power management
|
||||
*/
|
||||
static unsigned char saved_regs[] = {
|
||||
static const unsigned char saved_regs[] = {
|
||||
CM_REG_FUNCTRL1, CM_REG_CHFORMAT, CM_REG_LEGACY_CTRL, CM_REG_MISC_CTRL,
|
||||
CM_REG_MIXER0, CM_REG_MIXER1, CM_REG_MIXER2, CM_REG_MIXER3, CM_REG_PLL,
|
||||
CM_REG_CH0_FRAME1, CM_REG_CH0_FRAME2,
|
||||
|
@ -3297,7 +3297,7 @@ static unsigned char saved_regs[] = {
|
|||
CM_REG_INT_STATUS, CM_REG_INT_HLDCLR, CM_REG_FUNCTRL0,
|
||||
};
|
||||
|
||||
static unsigned char saved_mixers[] = {
|
||||
static const unsigned char saved_mixers[] = {
|
||||
SB_DSP4_MASTER_DEV, SB_DSP4_MASTER_DEV + 1,
|
||||
SB_DSP4_PCM_DEV, SB_DSP4_PCM_DEV + 1,
|
||||
SB_DSP4_SYNTH_DEV, SB_DSP4_SYNTH_DEV + 1,
|
||||
|
|
Loading…
Reference in New Issue