diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-12-08 13:33:24 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-12-08 13:33:24 +0300 |
commit | 77de61c3975da6f2200935c341e84018ece6ce36 (patch) | |
tree | 36508cf93ef62a80c988fa18c86eda1274e03877 /sound/pci/ice1712/ews.c | |
parent | 66139a48cee1530c91f37c145384b4ee7043f0b7 (diff) | |
parent | 048184540171672a724ab8f8bada7fcc0762f5c6 (diff) | |
download | linux-77de61c3975da6f2200935c341e84018ece6ce36.tar.xz |
Merge branch 'for-next' into for-linus
Diffstat (limited to 'sound/pci/ice1712/ews.c')
-rw-r--r-- | sound/pci/ice1712/ews.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/sound/pci/ice1712/ews.c b/sound/pci/ice1712/ews.c index 817a1bc50a60..5cb587cf360e 100644 --- a/sound/pci/ice1712/ews.c +++ b/sound/pci/ice1712/ews.c @@ -580,13 +580,7 @@ static int snd_ice1712_ewx_io_sense_info(struct snd_kcontrol *kcontrol, struct s static const char * const texts[2] = { "+4dBu", "-10dBV", }; - uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; - uinfo->count = 1; - uinfo->value.enumerated.items = 2; - if (uinfo->value.enumerated.item >= 2) - uinfo->value.enumerated.item = 1; - strcpy(uinfo->value.enumerated.name, texts[uinfo->value.enumerated.item]); - return 0; + return snd_ctl_enum_info(uinfo, 1, 2, texts); } static int snd_ice1712_ewx_io_sense_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) @@ -903,13 +897,7 @@ static int snd_ice1712_6fire_select_input_info(struct snd_kcontrol *kcontrol, st static const char * const texts[4] = { "Internal", "Front Input", "Rear Input", "Wave Table" }; - uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; - uinfo->count = 1; - uinfo->value.enumerated.items = 4; - if (uinfo->value.enumerated.item >= 4) - uinfo->value.enumerated.item = 1; - strcpy(uinfo->value.enumerated.name, texts[uinfo->value.enumerated.item]); - return 0; + return snd_ctl_enum_info(uinfo, 1, 4, texts); } static int snd_ice1712_6fire_select_input_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |