ASoC: codec duplicated callback function goes to component on ad193x
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Mon, 8 Aug 2016 09:09:43 +0000 (09:09 +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/codecs/ad193x.c

index 3a3f3f2343d75e7ee8b9b29abd3ee6887c1437f4..d643557d89a74d753567ed75821ebb16a0477415 100644 (file)
@@ -410,12 +410,14 @@ static int ad193x_codec_probe(struct snd_soc_codec *codec)
 
 static struct snd_soc_codec_driver soc_codec_dev_ad193x = {
        .probe = ad193x_codec_probe,
-       .controls = ad193x_snd_controls,
-       .num_controls = ARRAY_SIZE(ad193x_snd_controls),
-       .dapm_widgets = ad193x_dapm_widgets,
-       .num_dapm_widgets = ARRAY_SIZE(ad193x_dapm_widgets),
-       .dapm_routes = audio_paths,
-       .num_dapm_routes = ARRAY_SIZE(audio_paths),
+       .component_driver = {
+               .controls               = ad193x_snd_controls,
+               .num_controls           = ARRAY_SIZE(ad193x_snd_controls),
+               .dapm_widgets           = ad193x_dapm_widgets,
+               .num_dapm_widgets       = ARRAY_SIZE(ad193x_dapm_widgets),
+               .dapm_routes            = audio_paths,
+               .num_dapm_routes        = ARRAY_SIZE(audio_paths),
+       },
 };
 
 const struct regmap_config ad193x_regmap_config = {