ASoC: twl6040: Use SOC_ENUM_SINGLE_DECL()
authorTakashi Iwai <tiwai@suse.de>
Tue, 18 Feb 2014 09:30:20 +0000 (10:30 +0100)
committerMark Brown <broonie@linaro.org>
Sun, 23 Feb 2014 02:30:28 +0000 (11:30 +0900)
Just replace with the helper macro.
Also, use ARRAY_SIZE() in some ASOC_ENUM_SINGLE() lines.

No functional change at all.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/codecs/twl6040.c

index cb642c927dc8c37cfb8cddd243bb37932092c7eb..bd3a20647fdff04c0071bc9f77061eea457e77de 100644 (file)
@@ -392,8 +392,10 @@ static const char *twl6040_amicr_texts[] =
        {"Headset Mic", "Sub Mic", "Aux/FM Right", "Off"};
 
 static const struct soc_enum twl6040_enum[] = {
-       SOC_ENUM_SINGLE(TWL6040_REG_MICLCTL, 3, 4, twl6040_amicl_texts),
-       SOC_ENUM_SINGLE(TWL6040_REG_MICRCTL, 3, 4, twl6040_amicr_texts),
+       SOC_ENUM_SINGLE(TWL6040_REG_MICLCTL, 3,
+                       ARRAY_SIZE(twl6040_amicl_texts), twl6040_amicl_texts),
+       SOC_ENUM_SINGLE(TWL6040_REG_MICRCTL, 3,
+                       ARRAY_SIZE(twl6040_amicr_texts), twl6040_amicr_texts),
 };
 
 static const char *twl6040_hs_texts[] = {
@@ -476,9 +478,8 @@ static const char *twl6040_power_mode_texts[] = {
        "Low-Power", "High-Performance",
 };
 
-static const struct soc_enum twl6040_power_mode_enum =
-       SOC_ENUM_SINGLE_EXT(ARRAY_SIZE(twl6040_power_mode_texts),
-                       twl6040_power_mode_texts);
+static SOC_ENUM_SINGLE_EXT_DECL(twl6040_power_mode_enum,
+                               twl6040_power_mode_texts);
 
 static int twl6040_headset_power_get_enum(struct snd_kcontrol *kcontrol,
        struct snd_ctl_elem_value *ucontrol)