ASoC: simple-card: use asoc_simple_card_clk_xxx()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Fri, 9 Jun 2017 00:44:16 +0000 (00:44 +0000)
committerMark Brown <broonie@kernel.org>
Tue, 13 Jun 2017 20:57:51 +0000 (21:57 +0100)
Current simple-card-utils sets asoc_simple_dai::clk via
asoc_simple_card_parse_clk().
Current simple card drivers are using it directly for
clk_enable/disable.
Encapsulation is one of simple card util's purpose.
Let's use asoc_simple_card_clk_enable/disable.

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

index e26bd14ba70ffc687f3eb48642897be9058eadb7..8828b91867b837bcd35440647147c7045355c632 100644 (file)
@@ -118,13 +118,13 @@ static int asoc_simple_card_startup(struct snd_pcm_substream *substream)
                simple_priv_to_props(priv, rtd->num);
        int ret;
 
-       ret = clk_prepare_enable(dai_props->cpu_dai.clk);
+       ret = asoc_simple_card_clk_enable(&dai_props->cpu_dai);
        if (ret)
                return ret;
 
-       ret = clk_prepare_enable(dai_props->codec_dai.clk);
+       ret = asoc_simple_card_clk_enable(&dai_props->codec_dai);
        if (ret)
-               clk_disable_unprepare(dai_props->cpu_dai.clk);
+               asoc_simple_card_clk_disable(&dai_props->cpu_dai);
 
        return ret;
 }
@@ -136,9 +136,9 @@ static void asoc_simple_card_shutdown(struct snd_pcm_substream *substream)
        struct simple_dai_props *dai_props =
                simple_priv_to_props(priv, rtd->num);
 
-       clk_disable_unprepare(dai_props->cpu_dai.clk);
+       asoc_simple_card_clk_disable(&dai_props->cpu_dai);
 
-       clk_disable_unprepare(dai_props->codec_dai.clk);
+       asoc_simple_card_clk_disable(&dai_props->codec_dai);
 }
 
 static int asoc_simple_card_hw_params(struct snd_pcm_substream *substream,