From 6fddce26f84c8229db1f6689b6046aa3dff5c887 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Sun, 5 Jan 2020 15:47:29 +0100 Subject: ALSA: emu10k1: More constifications Apply const prefix to the remaining possible places: the static tables for init verbs and registers, the string arrays, the conversion tables, etc. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-15-tiwai@suse.de Signed-off-by: Takashi Iwai --- sound/pci/emu10k1/emu10k1_main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'sound/pci/emu10k1/emu10k1_main.c') diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c index 51af766f57d2..a89a7e603ca8 100644 --- a/sound/pci/emu10k1/emu10k1_main.c +++ b/sound/pci/emu10k1/emu10k1_main.c @@ -100,7 +100,7 @@ void snd_emu10k1_voice_init(struct snd_emu10k1 *emu, int ch) } } -static unsigned int spi_dac_init[] = { +static const unsigned int spi_dac_init[] = { 0x00ff, 0x02ff, 0x0400, @@ -124,7 +124,7 @@ static unsigned int spi_dac_init[] = { 0x1400, }; -static unsigned int i2c_adc_init[][2] = { +static const unsigned int i2c_adc_init[][2] = { { 0x17, 0x00 }, /* Reset */ { 0x07, 0x00 }, /* Timeout */ { 0x0b, 0x22 }, /* Interface control */ @@ -2050,7 +2050,7 @@ int snd_emu10k1_create(struct snd_card *card, } #ifdef CONFIG_PM_SLEEP -static unsigned char saved_regs[] = { +static const unsigned char saved_regs[] = { CPF, PTRX, CVCF, VTFT, Z1, Z2, PSST, DSL, CCCA, CCR, CLP, FXRT, MAPA, MAPB, ENVVOL, ATKHLDV, DCYSUSV, LFOVAL1, ENVVAL, ATKHLDM, DCYSUSM, LFOVAL2, IP, IFATN, PEFE, FMMOD, TREMFRQ, FM2FRQ2, @@ -2059,7 +2059,7 @@ static unsigned char saved_regs[] = { SPBYPASS, AC97SLOT, CDSRCS, GPSRCS, ZVSRCS, MICIDX, ADCIDX, FXIDX, 0xff /* end */ }; -static unsigned char saved_regs_audigy[] = { +static const unsigned char saved_regs_audigy[] = { A_ADCIDX, A_MICIDX, A_FXWC1, A_FXWC2, A_SAMPLE_RATE, A_FXRT2, A_SENDAMOUNTS, A_FXRT1, 0xff /* end */ @@ -2094,7 +2094,7 @@ static void free_pm_buffer(struct snd_emu10k1 *emu) void snd_emu10k1_suspend_regs(struct snd_emu10k1 *emu) { int i; - unsigned char *reg; + const unsigned char *reg; unsigned int *val; val = emu->saved_ptr; @@ -2127,7 +2127,7 @@ void snd_emu10k1_resume_init(struct snd_emu10k1 *emu) void snd_emu10k1_resume_regs(struct snd_emu10k1 *emu) { int i; - unsigned char *reg; + const unsigned char *reg; unsigned int *val; snd_emu10k1_audio_enable(emu); -- cgit