]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ALSA: oss: More constifications
authorTakashi Iwai <tiwai@suse.de>
Sun, 5 Jan 2020 14:47:55 +0000 (15:47 +0100)
committerTakashi Iwai <tiwai@suse.de>
Sun, 5 Jan 2020 15:14:58 +0000 (16:14 +0100)
Apply const prefix to the static tables for strings and formats.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-41-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/oss/mixer_oss.c
sound/core/oss/pcm_plugin.c

index 26502294f7d8c74b0ddb0cb2b180bb8efce847ac..f702c96a7478ff1ef3be32e62d4a16ba6fdb4b49 100644 (file)
@@ -1109,7 +1109,7 @@ static int snd_mixer_oss_build_input(struct snd_mixer_oss *mixer,
 /*
  */
 #define MIXER_VOL(name) [SOUND_MIXER_##name] = #name
-static char *oss_mixer_names[SNDRV_OSS_MAX_MIXERS] = {
+static const char * const oss_mixer_names[SNDRV_OSS_MAX_MIXERS] = {
        MIXER_VOL(VOLUME),
        MIXER_VOL(BASS),
        MIXER_VOL(TREBLE),
index 31cb2acf8afcc5988d47cdb2332c005c0558d18a..240e4702c09881409cd3de59306bae2409d5258f 100644 (file)
@@ -288,7 +288,7 @@ static int snd_pcm_plug_formats(const struct snd_mask *mask,
        return snd_mask_test(&formats, (__force int)format);
 }
 
-static snd_pcm_format_t preferred_formats[] = {
+static const snd_pcm_format_t preferred_formats[] = {
        SNDRV_PCM_FORMAT_S16_LE,
        SNDRV_PCM_FORMAT_S16_BE,
        SNDRV_PCM_FORMAT_U16_LE,