[alsa-devel] [PATCH 084/102] ASoC: arizona: Use SOC_ENUM_SINGLE_CONST()

Takashi Iwai tiwai at suse.de
Tue Feb 18 12:51:30 CET 2014


... for improving readability and maintainability.

Signed-off-by: Takashi Iwai <tiwai at suse.de>
---
 sound/soc/codecs/arizona.c | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)

diff --git a/sound/soc/codecs/arizona.c b/sound/soc/codecs/arizona.c
index a32b84ac03f6..53812c5a3d51 100644
--- a/sound/soc/codecs/arizona.c
+++ b/sound/soc/codecs/arizona.c
@@ -619,18 +619,14 @@ static const char * const arizona_in_dmic_osr_text[] = {
 };
 
 const struct soc_enum arizona_in_dmic_osr[] = {
-	SOC_ENUM_SINGLE(ARIZONA_IN1L_CONTROL, ARIZONA_IN1_OSR_SHIFT,
-			ARRAY_SIZE(arizona_in_dmic_osr_text),
-			arizona_in_dmic_osr_text),
-	SOC_ENUM_SINGLE(ARIZONA_IN2L_CONTROL, ARIZONA_IN2_OSR_SHIFT,
-			ARRAY_SIZE(arizona_in_dmic_osr_text),
-			arizona_in_dmic_osr_text),
-	SOC_ENUM_SINGLE(ARIZONA_IN3L_CONTROL, ARIZONA_IN3_OSR_SHIFT,
-			ARRAY_SIZE(arizona_in_dmic_osr_text),
-			arizona_in_dmic_osr_text),
-	SOC_ENUM_SINGLE(ARIZONA_IN4L_CONTROL, ARIZONA_IN4_OSR_SHIFT,
-			ARRAY_SIZE(arizona_in_dmic_osr_text),
-			arizona_in_dmic_osr_text),
+	SOC_ENUM_SINGLE_CONST(ARIZONA_IN1L_CONTROL, ARIZONA_IN1_OSR_SHIFT,
+			      arizona_in_dmic_osr_text),
+	SOC_ENUM_SINGLE_CONST(ARIZONA_IN2L_CONTROL, ARIZONA_IN2_OSR_SHIFT,
+			      arizona_in_dmic_osr_text),
+	SOC_ENUM_SINGLE_CONST(ARIZONA_IN3L_CONTROL, ARIZONA_IN3_OSR_SHIFT,
+			      arizona_in_dmic_osr_text),
+	SOC_ENUM_SINGLE_CONST(ARIZONA_IN4L_CONTROL, ARIZONA_IN4_OSR_SHIFT,
+			      arizona_in_dmic_osr_text),
 };
 EXPORT_SYMBOL_GPL(arizona_in_dmic_osr);
 
-- 
1.8.5.2



More information about the Alsa-devel mailing list