]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ASoC: codec duplicated callback function goes to component on tas571x
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Mon, 8 Aug 2016 08:55:21 +0000 (08:55 +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/tas571x.c

index d8baca3f8413d19bcdefd44a8917769bf484766f..df5e5cb33baaba035b1d9db577cbf772855ac3e9 100644 (file)
@@ -658,10 +658,12 @@ static const struct snd_soc_codec_driver tas571x_codec = {
        .set_bias_level = tas571x_set_bias_level,
        .idle_bias_off = true,
 
-       .dapm_widgets = tas571x_dapm_widgets,
-       .num_dapm_widgets = ARRAY_SIZE(tas571x_dapm_widgets),
-       .dapm_routes = tas571x_dapm_routes,
-       .num_dapm_routes = ARRAY_SIZE(tas571x_dapm_routes),
+       .component_driver = {
+               .dapm_widgets           = tas571x_dapm_widgets,
+               .num_dapm_widgets       = ARRAY_SIZE(tas571x_dapm_widgets),
+               .dapm_routes            = tas571x_dapm_routes,
+               .num_dapm_routes        = ARRAY_SIZE(tas571x_dapm_routes),
+       },
 };
 
 static struct snd_soc_dai_driver tas571x_dai = {
@@ -754,8 +756,8 @@ static int tas571x_i2c_probe(struct i2c_client *client,
 
 
        memcpy(&priv->codec_driver, &tas571x_codec, sizeof(priv->codec_driver));
-       priv->codec_driver.controls = priv->chip->controls;
-       priv->codec_driver.num_controls = priv->chip->num_controls;
+       priv->codec_driver.component_driver.controls = priv->chip->controls;
+       priv->codec_driver.component_driver.num_controls = priv->chip->num_controls;
 
        if (priv->chip->vol_reg_size == 2) {
                /*