ASoC: codec duplicated callback function goes to component on sun4i-codec
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Mon, 8 Aug 2016 08:46:41 +0000 (08:46 +0000)
committerMark Brown <broonie@kernel.org>
Mon, 8 Aug 2016 10:57:57 +0000 (11:57 +0100)
codec driver and component driver has duplicated callback functions,
and codec side functions are just copied to component side when
register timing. This was quick-hack, but no longer needed.
This patch moves these functions from codec driver to component driver.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sunxi/sun4i-codec.c

index 44f170c73b06a95a71d3b1a1680db37a8fb227f8..0e19c5070005736c4cb5ae27fc374ecb25d67030 100644 (file)
@@ -628,12 +628,14 @@ static const struct snd_soc_dapm_route sun4i_codec_codec_dapm_routes[] = {
 };
 
 static struct snd_soc_codec_driver sun4i_codec_codec = {
-       .controls               = sun4i_codec_widgets,
-       .num_controls           = ARRAY_SIZE(sun4i_codec_widgets),
-       .dapm_widgets           = sun4i_codec_codec_dapm_widgets,
-       .num_dapm_widgets       = ARRAY_SIZE(sun4i_codec_codec_dapm_widgets),
-       .dapm_routes            = sun4i_codec_codec_dapm_routes,
-       .num_dapm_routes        = ARRAY_SIZE(sun4i_codec_codec_dapm_routes),
+       .component_driver = {
+               .controls               = sun4i_codec_widgets,
+               .num_controls           = ARRAY_SIZE(sun4i_codec_widgets),
+               .dapm_widgets           = sun4i_codec_codec_dapm_widgets,
+               .num_dapm_widgets       = ARRAY_SIZE(sun4i_codec_codec_dapm_widgets),
+               .dapm_routes            = sun4i_codec_codec_dapm_routes,
+               .num_dapm_routes        = ARRAY_SIZE(sun4i_codec_codec_dapm_routes),
+       },
 };
 
 static const struct snd_soc_component_driver sun4i_codec_component = {