ALSA: nm256: constify snd_ac97_res_table
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Thu, 24 Aug 2017 06:25:28 +0000 (11:55 +0530)
committerTakashi Iwai <tiwai@suse.de>
Thu, 24 Aug 2017 07:13:43 +0000 (09:13 +0200)
snd_ac97_res_table are not supposed to change at runtime. All functions
working with snd_ac97_res_table provided by <sound/ac97_codec.h> work with
const snd_ac97_res_table. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/nm256/nm256.c

index 0ef8054c393643ff45a463827fcddbba2d67cc30..b97f4ea6b56c810948fc39ca0845eec0a060ca87 100644 (file)
@@ -1271,7 +1271,7 @@ snd_nm256_ac97_write(struct snd_ac97 *ac97,
 }
 
 /* static resolution table */
-static struct snd_ac97_res_table nm256_res_table[] = {
+static const struct snd_ac97_res_table nm256_res_table[] = {
        { AC97_MASTER, 0x1f1f },
        { AC97_HEADPHONE, 0x1f1f },
        { AC97_MASTER_MONO, 0x001f },