From f729f88a04089d2a0f2783182027347e0446b900 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Sun, 5 Jan 2020 15:47:23 +0100 Subject: ALSA: intel8x0: More constifications Apply const prefix to more places: the static tables for PCM definitions, the register tables, etc. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-9-tiwai@suse.de Signed-off-by: Takashi Iwai --- sound/pci/intel8x0m.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'sound/pci/intel8x0m.c') diff --git a/sound/pci/intel8x0m.c b/sound/pci/intel8x0m.c index 74d45b9a1571..1b7df0c4e57c 100644 --- a/sound/pci/intel8x0m.c +++ b/sound/pci/intel8x0m.c @@ -288,7 +288,7 @@ static inline void iaputword(struct intel8x0m *chip, u32 offset, u16 val) /* return the GLOB_STA bit for the corresponding codec */ static unsigned int get_ich_codec_bit(struct intel8x0m *chip, unsigned int codec) { - static unsigned int codec_bit[3] = { + static const unsigned int codec_bit[3] = { ICH_PCR, ICH_SCR, ICH_TCR }; if (snd_BUG_ON(codec >= 3)) @@ -686,7 +686,7 @@ struct ich_pcm_table { }; static int snd_intel8x0m_pcm1(struct intel8x0m *chip, int device, - struct ich_pcm_table *rec) + const struct ich_pcm_table *rec) { struct snd_pcm *pcm; int err; @@ -724,7 +724,7 @@ static int snd_intel8x0m_pcm1(struct intel8x0m *chip, int device, return 0; } -static struct ich_pcm_table intel_pcms[] = { +static const struct ich_pcm_table intel_pcms[] = { { .suffix = "Modem", .playback_ops = &snd_intel8x0m_playback_ops, @@ -737,7 +737,7 @@ static struct ich_pcm_table intel_pcms[] = { static int snd_intel8x0m_pcm(struct intel8x0m *chip) { int i, tblsize, device, err; - struct ich_pcm_table *tbl, *rec; + const struct ich_pcm_table *tbl, *rec; #if 1 tbl = intel_pcms; @@ -1082,11 +1082,11 @@ static int snd_intel8x0m_create(struct snd_card *card, static const struct snd_device_ops ops = { .dev_free = snd_intel8x0m_dev_free, }; - static struct ich_reg_info intel_regs[2] = { + static const struct ich_reg_info intel_regs[2] = { { ICH_MIINT, 0 }, { ICH_MOINT, 0x10 }, }; - struct ich_reg_info *tbl; + const struct ich_reg_info *tbl; *r_intel8x0m = NULL; -- cgit v1.2.3