ASoC: wm8991: Fix the wrong number of enum items

wm8991 codec driver has a few places wrongly defining the number of
enum items.

Use SOC_ENUM_SINGLE_DECL() macro and they are automatically fixed.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
This commit is contained in:
Takashi Iwai 2014-02-18 09:44:23 +01:00 committed by Mark Brown
parent e156291c7b
commit d07338b0f2

View File

@ -171,26 +171,23 @@ static int wm899x_outpga_put_volsw_vu(struct snd_kcontrol *kcontrol,
static const char *wm8991_digital_sidetone[] = static const char *wm8991_digital_sidetone[] =
{"None", "Left ADC", "Right ADC", "Reserved"}; {"None", "Left ADC", "Right ADC", "Reserved"};
static const struct soc_enum wm8991_left_digital_sidetone_enum = static SOC_ENUM_SINGLE_DECL(wm8991_left_digital_sidetone_enum,
SOC_ENUM_SINGLE(WM8991_DIGITAL_SIDE_TONE, WM8991_DIGITAL_SIDE_TONE,
WM8991_ADC_TO_DACL_SHIFT, WM8991_ADC_TO_DACL_SHIFT,
WM8991_ADC_TO_DACL_MASK, wm8991_digital_sidetone);
wm8991_digital_sidetone);
static const struct soc_enum wm8991_right_digital_sidetone_enum = static SOC_ENUM_SINGLE_DECL(wm8991_right_digital_sidetone_enum,
SOC_ENUM_SINGLE(WM8991_DIGITAL_SIDE_TONE, WM8991_DIGITAL_SIDE_TONE,
WM8991_ADC_TO_DACR_SHIFT, WM8991_ADC_TO_DACR_SHIFT,
WM8991_ADC_TO_DACR_MASK, wm8991_digital_sidetone);
wm8991_digital_sidetone);
static const char *wm8991_adcmode[] = static const char *wm8991_adcmode[] =
{"Hi-fi mode", "Voice mode 1", "Voice mode 2", "Voice mode 3"}; {"Hi-fi mode", "Voice mode 1", "Voice mode 2", "Voice mode 3"};
static const struct soc_enum wm8991_right_adcmode_enum = static SOC_ENUM_SINGLE_DECL(wm8991_right_adcmode_enum,
SOC_ENUM_SINGLE(WM8991_ADC_CTRL, WM8991_ADC_CTRL,
WM8991_ADC_HPF_CUT_SHIFT, WM8991_ADC_HPF_CUT_SHIFT,
WM8991_ADC_HPF_CUT_MASK, wm8991_adcmode);
wm8991_adcmode);
static const struct snd_kcontrol_new wm8991_snd_controls[] = { static const struct snd_kcontrol_new wm8991_snd_controls[] = {
/* INMIXL */ /* INMIXL */
@ -486,9 +483,9 @@ static const struct snd_kcontrol_new wm8991_dapm_inmixr_controls[] = {
static const char *wm8991_ainlmux[] = static const char *wm8991_ainlmux[] =
{"INMIXL Mix", "RXVOICE Mix", "DIFFINL Mix"}; {"INMIXL Mix", "RXVOICE Mix", "DIFFINL Mix"};
static const struct soc_enum wm8991_ainlmux_enum = static SOC_ENUM_SINGLE_DECL(wm8991_ainlmux_enum,
SOC_ENUM_SINGLE(WM8991_INPUT_MIXER1, WM8991_AINLMODE_SHIFT, WM8991_INPUT_MIXER1, WM8991_AINLMODE_SHIFT,
ARRAY_SIZE(wm8991_ainlmux), wm8991_ainlmux); wm8991_ainlmux);
static const struct snd_kcontrol_new wm8991_dapm_ainlmux_controls = static const struct snd_kcontrol_new wm8991_dapm_ainlmux_controls =
SOC_DAPM_ENUM("Route", wm8991_ainlmux_enum); SOC_DAPM_ENUM("Route", wm8991_ainlmux_enum);
@ -499,9 +496,9 @@ static const struct snd_kcontrol_new wm8991_dapm_ainlmux_controls =
static const char *wm8991_ainrmux[] = static const char *wm8991_ainrmux[] =
{"INMIXR Mix", "RXVOICE Mix", "DIFFINR Mix"}; {"INMIXR Mix", "RXVOICE Mix", "DIFFINR Mix"};
static const struct soc_enum wm8991_ainrmux_enum = static SOC_ENUM_SINGLE_DECL(wm8991_ainrmux_enum,
SOC_ENUM_SINGLE(WM8991_INPUT_MIXER1, WM8991_AINRMODE_SHIFT, WM8991_INPUT_MIXER1, WM8991_AINRMODE_SHIFT,
ARRAY_SIZE(wm8991_ainrmux), wm8991_ainrmux); wm8991_ainrmux);
static const struct snd_kcontrol_new wm8991_dapm_ainrmux_controls = static const struct snd_kcontrol_new wm8991_dapm_ainrmux_controls =
SOC_DAPM_ENUM("Route", wm8991_ainrmux_enum); SOC_DAPM_ENUM("Route", wm8991_ainrmux_enum);