ASoC: sun8i-codec: Convert to SOC_MIXER_ARRAY
authorMylène Josserand <mylene.josserand@free-electrons.com>
Fri, 10 Feb 2017 09:41:32 +0000 (10:41 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 8 Mar 2017 13:17:53 +0000 (14:17 +0100)
SOC_MIXER_ARRAY is a simplified function of SND_SOC_DAPM_MIXER
which handles automatically the ARRAY_SIZE of controls.

Update the driver to use SOC_MIXER_ARRAY.

Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sunxi/sun8i-codec.c

index 107fa82136003f6c24f684ed6057e7c6531858ad..a75a983974d922b4b136766c464281a86d89e0d8 100644 (file)
@@ -288,12 +288,10 @@ static const struct snd_soc_dapm_widget sun8i_codec_dapm_widgets[] = {
                         SUN8I_AIF1_DACDAT_CTRL_AIF1_DA0R_ENA, 0),
 
        /* DAC Mixers */
-       SND_SOC_DAPM_MIXER("Left Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
-                          sun8i_dac_mixer_controls,
-                          ARRAY_SIZE(sun8i_dac_mixer_controls)),
-       SND_SOC_DAPM_MIXER("Right Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
-                          sun8i_dac_mixer_controls,
-                          ARRAY_SIZE(sun8i_dac_mixer_controls)),
+       SOC_MIXER_ARRAY("Left Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
+                       sun8i_dac_mixer_controls),
+       SOC_MIXER_ARRAY("Right Digital DAC Mixer", SND_SOC_NOPM, 0, 0,
+                       sun8i_dac_mixer_controls),
 
        /* Clocks */
        SND_SOC_DAPM_SUPPLY("MODCLK AFI1", SUN8I_MOD_CLK_ENA,