]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ALSA: ymfpci: More constifications
authorTakashi Iwai <tiwai@suse.de>
Sun, 5 Jan 2020 14:47:40 +0000 (15:47 +0100)
committerTakashi Iwai <tiwai@suse.de>
Sun, 5 Jan 2020 15:14:49 +0000 (16:14 +0100)
Apply const prefix to each possible place: the static tables for
sample rates, parameters and registers.

Just for minor optimization and no functional changes.

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

index 1cffd988b6169d0de6d1b3cc42d19428b83c8830..e07d70307d203e1620107d564b0061b11a83f30b 100644 (file)
@@ -122,14 +122,14 @@ static u32 snd_ymfpci_calc_delta(u32 rate)
        }
 }
 
-static u32 def_rate[8] = {
+static const u32 def_rate[8] = {
        100, 2000, 8000, 11025, 16000, 22050, 32000, 48000
 };
 
 static u32 snd_ymfpci_calc_lpfK(u32 rate)
 {
        u32 i;
-       static u32 val[8] = {
+       static const u32 val[8] = {
                0x00570000, 0x06AA0000, 0x18B20000, 0x20930000,
                0x2B9A0000, 0x35A10000, 0x3EAA0000, 0x40000000
        };
@@ -145,7 +145,7 @@ static u32 snd_ymfpci_calc_lpfK(u32 rate)
 static u32 snd_ymfpci_calc_lpfQ(u32 rate)
 {
        u32 i;
-       static u32 val[8] = {
+       static const u32 val[8] = {
                0x35280000, 0x34A70000, 0x32020000, 0x31770000,
                0x31390000, 0x31C90000, 0x33D00000, 0x40000000
        };
@@ -2234,7 +2234,7 @@ static int snd_ymfpci_dev_free(struct snd_device *device)
 }
 
 #ifdef CONFIG_PM_SLEEP
-static int saved_regs_index[] = {
+static const int saved_regs_index[] = {
        /* spdif */
        YDSXGR_SPDIFOUTCTRL,
        YDSXGR_SPDIFOUTSTATUS,