diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-01-19 11:22:54 +0000 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-01-19 11:22:54 +0000 |
commit | a1926d1745114789687ac029ae8c58944b7d2256 (patch) | |
tree | c303e75615e378451a80b97bfd2c1ba54029d9bb /sound/pci/ymfpci/ymfpci_main.c | |
parent | 492e917635a0fa05439bb562fd51577efc9cef30 (diff) | |
parent | 52fc43f7c1c416b114e88ff39635c36e67ef15b6 (diff) |
Merge branch 'for-2.6.38' into for-2.6.39
Diffstat (limited to 'sound/pci/ymfpci/ymfpci_main.c')
-rw-r--r-- | sound/pci/ymfpci/ymfpci_main.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/sound/pci/ymfpci/ymfpci_main.c b/sound/pci/ymfpci/ymfpci_main.c index 5518371db13..c94c051ad0c 100644 --- a/sound/pci/ymfpci/ymfpci_main.c +++ b/sound/pci/ymfpci/ymfpci_main.c @@ -1389,15 +1389,9 @@ static struct snd_kcontrol_new snd_ymfpci_spdif_stream __devinitdata = static int snd_ymfpci_drec_source_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *info) { - static char *texts[3] = {"AC'97", "IEC958", "ZV Port"}; - - info->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; - info->count = 1; - info->value.enumerated.items = 3; - if (info->value.enumerated.item > 2) - info->value.enumerated.item = 2; - strcpy(info->value.enumerated.name, texts[info->value.enumerated.item]); - return 0; + static const char *const texts[3] = {"AC'97", "IEC958", "ZV Port"}; + + return snd_ctl_enum_info(info, 1, 3, texts); } static int snd_ymfpci_drec_source_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *value) |