]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ASoC: arizona: Fix wrong number of items in enum ctls
authorTakashi Iwai <tiwai@suse.de>
Tue, 18 Feb 2014 09:01:43 +0000 (10:01 +0100)
committerMark Brown <broonie@linaro.org>
Thu, 20 Feb 2014 01:43:59 +0000 (10:43 +0900)
arizona 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: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/codecs/arizona.c

index e4295fee8f13673f15f9811a9516ba84bb548584..a32b84ac03f6e1995dc8f6ae7cc5f35e067c5e2d 100644 (file)
@@ -542,67 +542,76 @@ static const char *arizona_vol_ramp_text[] = {
        "15ms/6dB", "30ms/6dB",
 };
 
-const struct soc_enum arizona_in_vd_ramp =
-       SOC_ENUM_SINGLE(ARIZONA_INPUT_VOLUME_RAMP,
-                       ARIZONA_IN_VD_RAMP_SHIFT, 7, arizona_vol_ramp_text);
+SOC_ENUM_SINGLE_DECL(arizona_in_vd_ramp,
+                    ARIZONA_INPUT_VOLUME_RAMP,
+                    ARIZONA_IN_VD_RAMP_SHIFT,
+                    arizona_vol_ramp_text);
 EXPORT_SYMBOL_GPL(arizona_in_vd_ramp);
 
-const struct soc_enum arizona_in_vi_ramp =
-       SOC_ENUM_SINGLE(ARIZONA_INPUT_VOLUME_RAMP,
-                       ARIZONA_IN_VI_RAMP_SHIFT, 7, arizona_vol_ramp_text);
+SOC_ENUM_SINGLE_DECL(arizona_in_vi_ramp,
+                    ARIZONA_INPUT_VOLUME_RAMP,
+                    ARIZONA_IN_VI_RAMP_SHIFT,
+                    arizona_vol_ramp_text);
 EXPORT_SYMBOL_GPL(arizona_in_vi_ramp);
 
-const struct soc_enum arizona_out_vd_ramp =
-       SOC_ENUM_SINGLE(ARIZONA_OUTPUT_VOLUME_RAMP,
-                       ARIZONA_OUT_VD_RAMP_SHIFT, 7, arizona_vol_ramp_text);
+SOC_ENUM_SINGLE_DECL(arizona_out_vd_ramp,
+                    ARIZONA_OUTPUT_VOLUME_RAMP,
+                    ARIZONA_OUT_VD_RAMP_SHIFT,
+                    arizona_vol_ramp_text);
 EXPORT_SYMBOL_GPL(arizona_out_vd_ramp);
 
-const struct soc_enum arizona_out_vi_ramp =
-       SOC_ENUM_SINGLE(ARIZONA_OUTPUT_VOLUME_RAMP,
-                       ARIZONA_OUT_VI_RAMP_SHIFT, 7, arizona_vol_ramp_text);
+SOC_ENUM_SINGLE_DECL(arizona_out_vi_ramp,
+                    ARIZONA_OUTPUT_VOLUME_RAMP,
+                    ARIZONA_OUT_VI_RAMP_SHIFT,
+                    arizona_vol_ramp_text);
 EXPORT_SYMBOL_GPL(arizona_out_vi_ramp);
 
 static const char *arizona_lhpf_mode_text[] = {
        "Low-pass", "High-pass"
 };
 
-const struct soc_enum arizona_lhpf1_mode =
-       SOC_ENUM_SINGLE(ARIZONA_HPLPF1_1, ARIZONA_LHPF1_MODE_SHIFT, 2,
-                       arizona_lhpf_mode_text);
+SOC_ENUM_SINGLE_DECL(arizona_lhpf1_mode,
+                    ARIZONA_HPLPF1_1,
+                    ARIZONA_LHPF1_MODE_SHIFT,
+                    arizona_lhpf_mode_text);
 EXPORT_SYMBOL_GPL(arizona_lhpf1_mode);
 
-const struct soc_enum arizona_lhpf2_mode =
-       SOC_ENUM_SINGLE(ARIZONA_HPLPF2_1, ARIZONA_LHPF2_MODE_SHIFT, 2,
-                       arizona_lhpf_mode_text);
+SOC_ENUM_SINGLE_DECL(arizona_lhpf2_mode,
+                    ARIZONA_HPLPF2_1,
+                    ARIZONA_LHPF2_MODE_SHIFT,
+                    arizona_lhpf_mode_text);
 EXPORT_SYMBOL_GPL(arizona_lhpf2_mode);
 
-const struct soc_enum arizona_lhpf3_mode =
-       SOC_ENUM_SINGLE(ARIZONA_HPLPF3_1, ARIZONA_LHPF3_MODE_SHIFT, 2,
-                       arizona_lhpf_mode_text);
+SOC_ENUM_SINGLE_DECL(arizona_lhpf3_mode,
+                    ARIZONA_HPLPF3_1,
+                    ARIZONA_LHPF3_MODE_SHIFT,
+                    arizona_lhpf_mode_text);
 EXPORT_SYMBOL_GPL(arizona_lhpf3_mode);
 
-const struct soc_enum arizona_lhpf4_mode =
-       SOC_ENUM_SINGLE(ARIZONA_HPLPF4_1, ARIZONA_LHPF4_MODE_SHIFT, 2,
-                       arizona_lhpf_mode_text);
+SOC_ENUM_SINGLE_DECL(arizona_lhpf4_mode,
+                    ARIZONA_HPLPF4_1,
+                    ARIZONA_LHPF4_MODE_SHIFT,
+                    arizona_lhpf_mode_text);
 EXPORT_SYMBOL_GPL(arizona_lhpf4_mode);
 
 static const char *arizona_ng_hold_text[] = {
        "30ms", "120ms", "250ms", "500ms",
 };
 
-const struct soc_enum arizona_ng_hold =
-       SOC_ENUM_SINGLE(ARIZONA_NOISE_GATE_CONTROL, ARIZONA_NGATE_HOLD_SHIFT,
-                       4, arizona_ng_hold_text);
+SOC_ENUM_SINGLE_DECL(arizona_ng_hold,
+                    ARIZONA_NOISE_GATE_CONTROL,
+                    ARIZONA_NGATE_HOLD_SHIFT,
+                    arizona_ng_hold_text);
 EXPORT_SYMBOL_GPL(arizona_ng_hold);
 
 static const char * const arizona_in_hpf_cut_text[] = {
        "2.5Hz", "5Hz", "10Hz", "20Hz", "40Hz"
 };
 
-const struct soc_enum arizona_in_hpf_cut_enum =
-       SOC_ENUM_SINGLE(ARIZONA_HPF_CONTROL, ARIZONA_IN_HPF_CUT_SHIFT,
-                       ARRAY_SIZE(arizona_in_hpf_cut_text),
-                       arizona_in_hpf_cut_text);
+SOC_ENUM_SINGLE_DECL(arizona_in_hpf_cut_enum,
+                    ARIZONA_HPF_CONTROL,
+                    ARIZONA_IN_HPF_CUT_SHIFT,
+                    arizona_in_hpf_cut_text);
 EXPORT_SYMBOL_GPL(arizona_in_hpf_cut_enum);
 
 static const char * const arizona_in_dmic_osr_text[] = {