From 0da2c47a951c27f1be34cb9221d77b0ed2db6cee Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 3 Jan 2020 09:16:50 +0100 Subject: ALSA: i2c: 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. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-35-tiwai@suse.de Signed-off-by: Takashi Iwai --- sound/i2c/tea6330t.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sound/i2c/tea6330t.c') diff --git a/sound/i2c/tea6330t.c b/sound/i2c/tea6330t.c index 93ca8bb71f54..08eb6a873768 100644 --- a/sound/i2c/tea6330t.c +++ b/sound/i2c/tea6330t.c @@ -260,7 +260,7 @@ static int snd_tea6330t_put_treble(struct snd_kcontrol *kcontrol, return change; } -static struct snd_kcontrol_new snd_tea6330t_controls[] = { +static const struct snd_kcontrol_new snd_tea6330t_controls[] = { TEA6330T_MASTER_SWITCH("Master Playback Switch", 0), TEA6330T_MASTER_VOLUME("Master Playback Volume", 0), TEA6330T_BASS("Tone Control - Bass", 0), @@ -278,7 +278,7 @@ int snd_tea6330t_update_mixer(struct snd_card *card, { struct snd_i2c_device *device; struct tea6330t *tea; - struct snd_kcontrol_new *knew; + const struct snd_kcontrol_new *knew; unsigned int idx; int err = -ENOMEM; u8 default_treble, default_bass; -- cgit v1.2.3