]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ALSA: nm256: More constifications
authorTakashi Iwai <tiwai@suse.de>
Sun, 5 Jan 2020 14:47:42 +0000 (15:47 +0100)
committerTakashi Iwai <tiwai@suse.de>
Sun, 5 Jan 2020 15:14:50 +0000 (16:14 +0100)
Apply const prefix to the static tables coefs and init registers.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-28-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/nm256/nm256.c
sound/pci/nm256/nm256_coef.c

index 25275a98e9505dc6e03be19e6d92968a65813dd9..1726f2959ae8399d32c778fca73b4d77026a99be 100644 (file)
@@ -299,7 +299,7 @@ snd_nm256_writel(struct nm256 *chip, int offset, u32 val)
 }
 
 static inline void
-snd_nm256_write_buffer(struct nm256 *chip, void *src, int offset, int size)
+snd_nm256_write_buffer(struct nm256 *chip, const void *src, int offset, int size)
 {
        offset -= chip->buffer_start;
 #ifdef CONFIG_SND_DEBUG
@@ -1179,7 +1179,7 @@ struct initialValues {
        unsigned short value;
 };
 
-static struct initialValues nm256_ac97_init_val[] =
+static const struct initialValues nm256_ac97_init_val[] =
 {
        { AC97_MASTER,          0x8000 },
        { AC97_HEADPHONE,       0x8000 },
index c757252119b1dbe93dd9310aa3dfa7ddbb9f9006..f0599dbe84923d0e58e38ca917125b0442118736 100644 (file)
@@ -1,7 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0
 #define NM_TOTAL_COEFF_COUNT 0x3158
 
-static char coefficients[NM_TOTAL_COEFF_COUNT * 4] = { 
+static const char coefficients[NM_TOTAL_COEFF_COUNT * 4] = {
        0xFF, 0xFF, 0x2F, 0x00, 0x4B, 0xFF, 0xA5, 0x01, 0xEF, 0xFC, 0x21,
        0x05, 0x87, 0xF7, 0x62, 0x11, 0xE9, 0x45, 0x5E, 0xF9, 0xB5, 0x01,
        0xDE, 0xFF, 0xA4, 0xFF, 0x60, 0x00, 0xCA, 0xFF, 0x0D, 0x00, 0xFD,
@@ -4598,7 +4598,7 @@ static char coefficients[NM_TOTAL_COEFF_COUNT * 4] = {
        0x01, 0x8D, 0xFF, 0x0F, 0x00 
 };
 
-static u16
+static const u16
 coefficient_sizes[8 * 2] = {
        /* Playback */
        0x00C0, 0x5000, 0x0060, 0x2800, 0x0040, 0x0060, 0x1400, 0x0000,