diff options
author | Takashi Iwai <tiwai@suse.de> | 2020-01-03 11:16:49 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2020-01-03 11:24:23 +0300 |
commit | 2eccd408037449ac6c1ceba1d74bd10c67dc13d7 (patch) | |
tree | 7861e49b5ac26074bd0c9351a0d2a2fc89bd5a59 /sound/drivers/pcsp | |
parent | dde5199c988b16426cf9a4e0df4b7ae06790471e (diff) | |
download | linux-2eccd408037449ac6c1ceba1d74bd10c67dc13d7.tar.xz |
ALSA: drivers: Constify snd_kcontrol_new items
Most of snd_kcontrol_new definitions are read-only and passed as-is.
Let's declare them as const for further optimization.
Constify snd_kcontrol_new items
There should be no functional changes by this patch.
Link: https://lore.kernel.org/r/20200103081714.9560-34-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/drivers/pcsp')
-rw-r--r-- | sound/drivers/pcsp/pcsp_mixer.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/drivers/pcsp/pcsp_mixer.c b/sound/drivers/pcsp/pcsp_mixer.c index be2990451bcd..da33e5b620a7 100644 --- a/sound/drivers/pcsp/pcsp_mixer.c +++ b/sound/drivers/pcsp/pcsp_mixer.c @@ -120,17 +120,17 @@ static int pcsp_pcspkr_put(struct snd_kcontrol *kcontrol, .put = pcsp_##ctl_type##_put, \ } -static struct snd_kcontrol_new snd_pcsp_controls_pcm[] = { +static const struct snd_kcontrol_new snd_pcsp_controls_pcm[] = { PCSP_MIXER_CONTROL(enable, "Master Playback Switch"), PCSP_MIXER_CONTROL(treble, "BaseFRQ Playback Volume"), }; -static struct snd_kcontrol_new snd_pcsp_controls_spkr[] = { +static const struct snd_kcontrol_new snd_pcsp_controls_spkr[] = { PCSP_MIXER_CONTROL(pcspkr, "Beep Playback Switch"), }; static int snd_pcsp_ctls_add(struct snd_pcsp *chip, - struct snd_kcontrol_new *ctls, int num) + const struct snd_kcontrol_new *ctls, int num) { int i, err; struct snd_card *card = chip->card; |