From 15a1af95d65729d35071445b9459c1e22f776347 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Sun, 5 Jan 2020 15:48:04 +0100 Subject: ALSA: gus: More constifications Apply const prefix to each possible place: the static resource tables, the volume table, etc. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-50-tiwai@suse.de Signed-off-by: Takashi Iwai --- sound/isa/gus/interwave.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sound/isa/gus/interwave.c') diff --git a/sound/isa/gus/interwave.c b/sound/isa/gus/interwave.c index 5cd4aa477ba7..3e9ad930deae 100644 --- a/sound/isa/gus/interwave.c +++ b/sound/isa/gus/interwave.c @@ -364,7 +364,7 @@ struct rom_hdr { static void snd_interwave_detect_memory(struct snd_gus_card *gus) { - static unsigned int lmc[13] = + static const unsigned int lmc[13] = { 0x00000001, 0x00000101, 0x01010101, 0x00000401, 0x04040401, 0x00040101, 0x04040101, 0x00000004, @@ -475,7 +475,7 @@ static void snd_interwave_init(int dev, struct snd_gus_card *gus) } -static struct snd_kcontrol_new snd_interwave_controls[] = { +static const struct snd_kcontrol_new snd_interwave_controls[] = { WSS_DOUBLE("Master Playback Switch", 0, CS4231_LINE_LEFT_OUTPUT, CS4231_LINE_RIGHT_OUTPUT, 7, 7, 1, 1), WSS_DOUBLE("Master Playback Volume", 0, @@ -788,8 +788,8 @@ static int snd_interwave_isa_probe(struct device *pdev, unsigned int dev) { int err; - static int possible_irqs[] = {5, 11, 12, 9, 7, 15, 3, -1}; - static int possible_dmas[] = {0, 1, 3, 5, 6, 7, -1}; + static const int possible_irqs[] = {5, 11, 12, 9, 7, 15, 3, -1}; + static const int possible_dmas[] = {0, 1, 3, 5, 6, 7, -1}; if (irq[dev] == SNDRV_AUTO_IRQ) { if ((irq[dev] = snd_legacy_find_free_irq(possible_irqs)) < 0) { @@ -813,7 +813,7 @@ static int snd_interwave_isa_probe(struct device *pdev, if (port[dev] != SNDRV_AUTO_PORT) return snd_interwave_isa_probe1(dev, pdev); else { - static long possible_ports[] = {0x210, 0x220, 0x230, 0x240, 0x250, 0x260}; + static const long possible_ports[] = {0x210, 0x220, 0x230, 0x240, 0x250, 0x260}; int i; for (i = 0; i < ARRAY_SIZE(possible_ports); i++) { port[dev] = possible_ports[i]; -- cgit v1.2.3