]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
ASoC: rsnd: adg: tidyup rsnd_adg_get_clkin/out() parameter
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 1 Jun 2021 23:43:36 +0000 (08:43 +0900)
committerMark Brown <broonie@kernel.org>
Thu, 3 Jun 2021 12:56:39 +0000 (13:56 +0100)
set priv->adg before rsnd_adg_get_clkin/out() to be more simple code.
Nothing is changed, but is preparation for
next "ASoC: rsnd: adg: use more simple method for null_clk" patch

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87sg21i21j.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sh/rcar/adg.c

index 390d5e22fbb89fecbb60aaf9182cf7f0581a8574..af6132479593a0c5b98c44e49d27c4b62386f144 100644 (file)
@@ -412,9 +412,9 @@ static struct clk *rsnd_adg_null_clk_get(struct rsnd_priv *priv)
        return clk_hw_get_clk(priv->null_hw, NULL_CLK);
 }
 
-static void rsnd_adg_get_clkin(struct rsnd_priv *priv,
-                              struct rsnd_adg *adg)
+static void rsnd_adg_get_clkin(struct rsnd_priv *priv)
 {
+       struct rsnd_adg *adg = priv->adg;
        struct device *dev = rsnd_priv_to_dev(priv);
        int i;
 
@@ -430,9 +430,9 @@ static void rsnd_adg_get_clkin(struct rsnd_priv *priv,
        }
 }
 
-static void rsnd_adg_get_clkout(struct rsnd_priv *priv,
-                               struct rsnd_adg *adg)
+static void rsnd_adg_get_clkout(struct rsnd_priv *priv)
 {
+       struct rsnd_adg *adg = priv->adg;
        struct clk *clk;
        struct device *dev = rsnd_priv_to_dev(priv);
        struct device_node *np = dev->of_node;
@@ -644,11 +644,11 @@ int rsnd_adg_probe(struct rsnd_priv *priv)
        if (ret)
                return ret;
 
-       rsnd_adg_get_clkin(priv, adg);
-       rsnd_adg_get_clkout(priv, adg);
-
        priv->adg = adg;
 
+       rsnd_adg_get_clkin(priv);
+       rsnd_adg_get_clkout(priv);
+
        rsnd_adg_clk_enable(priv);
        rsnd_adg_clk_dbg_info(priv, NULL);