diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2018-05-15 16:12:57 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2018-05-15 19:05:27 +0300 |
commit | b0eaa0721df31d4a7c47989a1ac6faedd8495ba1 (patch) | |
tree | ff2c0f880e97ee43ac153af337204409a3eab132 /sound/pci | |
parent | 710669455d9e6978336dcbcb220024fb64ec2d38 (diff) | |
download | linux-b0eaa0721df31d4a7c47989a1ac6faedd8495ba1.tar.xz |
ALSA: hda/ca0132: constify templates for control element set
An array of templates for control element set is passed as an
argument for snd_hda_add_new_ctls(). This argument has 'const'
qualifier therefore the passed array can have the qualifier.
This commit adds this optimization.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/hda/patch_ca0132.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/pci/hda/patch_ca0132.c b/sound/pci/hda/patch_ca0132.c index 1cc4f5133645..d18022d72e83 100644 --- a/sound/pci/hda/patch_ca0132.c +++ b/sound/pci/hda/patch_ca0132.c @@ -892,7 +892,7 @@ enum dsp_download_state { */ struct ca0132_spec { - struct snd_kcontrol_new *mixers[5]; + const struct snd_kcontrol_new *mixers[5]; unsigned int num_mixers; const struct hda_verb *base_init_verbs; const struct hda_verb *base_exit_verbs; @@ -5705,7 +5705,7 @@ static void ca0132_alt_add_chmap_ctls(struct hda_codec *codec) * When changing Node IDs for Mixer Controls below, make sure to update * Node IDs in ca0132_config() as well. */ -static struct snd_kcontrol_new ca0132_mixer[] = { +static const struct snd_kcontrol_new ca0132_mixer[] = { CA0132_CODEC_VOL("Master Playback Volume", VNID_SPK, HDA_OUTPUT), CA0132_CODEC_MUTE("Master Playback Switch", VNID_SPK, HDA_OUTPUT), CA0132_CODEC_VOL("Capture Volume", VNID_MIC, HDA_INPUT), @@ -5732,7 +5732,7 @@ static struct snd_kcontrol_new ca0132_mixer[] = { * controls. Also sets both the Front Playback and Capture Volume controls to * alt so they set the DSP's decibel level. */ -static struct snd_kcontrol_new sbz_mixer[] = { +static const struct snd_kcontrol_new sbz_mixer[] = { CA0132_ALT_CODEC_VOL("Front Playback Volume", 0x02, HDA_OUTPUT), CA0132_CODEC_MUTE("Front Playback Switch", VNID_SPK, HDA_OUTPUT), HDA_CODEC_VOLUME("Surround Playback Volume", 0x04, 0, HDA_OUTPUT), @@ -5754,7 +5754,7 @@ static struct snd_kcontrol_new sbz_mixer[] = { * Same as the Sound Blaster Z, except doesn't use the alt volume for capture * because it doesn't set decibel levels for the DSP for capture. */ -static struct snd_kcontrol_new r3di_mixer[] = { +static const struct snd_kcontrol_new r3di_mixer[] = { CA0132_ALT_CODEC_VOL("Front Playback Volume", 0x02, HDA_OUTPUT), CA0132_CODEC_MUTE("Front Playback Switch", VNID_SPK, HDA_OUTPUT), HDA_CODEC_VOLUME("Surround Playback Volume", 0x04, 0, HDA_OUTPUT), |