summaryrefslogtreecommitdiffstats
path: root/sound/pci/ice1712/se.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-10-20 18:18:50 +0200
committerTakashi Iwai <tiwai@suse.de>2014-10-21 09:02:50 +0200
commit597da2e4dfa04c8ee66b09fce931ab6825bc3e75 (patch)
treed130e83bdb4dff46addb77f01f1ac6831f202203 /sound/pci/ice1712/se.c
parentc4fa251f6f3ed00d59d0d8ee63bf346e6dd6b664 (diff)
downloadlinux-597da2e4dfa04c8ee66b09fce931ab6825bc3e75.tar.bz2
ALSA: ice1724: Use snd_ctl_enum_info()
... and reduce the open codes. Also add missing const to text arrays. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/ice1712/se.c')
-rw-r--r--sound/pci/ice1712/se.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/sound/pci/ice1712/se.c b/sound/pci/ice1712/se.c
index ffd894bb4507..1c5d5b22c7a0 100644
--- a/sound/pci/ice1712/se.c
+++ b/sound/pci/ice1712/se.c
@@ -452,14 +452,7 @@ static int se200pci_cont_enum_info(struct snd_kcontrol *kc,
c = se200pci_get_enum_count(n);
if (!c)
return -EINVAL;
- uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
- uinfo->count = 1;
- uinfo->value.enumerated.items = c;
- if (uinfo->value.enumerated.item >= c)
- uinfo->value.enumerated.item = c - 1;
- strcpy(uinfo->value.enumerated.name,
- se200pci_cont[n].member[uinfo->value.enumerated.item]);
- return 0;
+ return snd_ctl_enum_info(uinfo, 1, c, se200pci_cont[n].member);
}
static int se200pci_cont_volume_get(struct snd_kcontrol *kc,