diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2017-03-30 01:49:06 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-03-30 22:22:32 +0100 |
commit | d7f298197a22f11b38059f257842dac7c30a564c (patch) | |
tree | 999c45b884228b6f9601e92e71e0e1d94219a76d /sound/soc | |
parent | 9986943ef5d61a9bea3c86000d91d3b789f0060e (diff) | |
download | linux-d7f298197a22f11b38059f257842dac7c30a564c.tar.bz2 |
ASoC: rcar: fixup of_clk_add_provider() usage for multi clkout
Current adg is calling of_clk_add_povider() multiple times,
but it is not correct usage. This patch fixup its parameter
and call it once.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/sh/rcar/adg.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/sound/soc/sh/rcar/adg.c b/sound/soc/sh/rcar/adg.c index 85a33ac0a5c4..56107454bdb3 100644 --- a/sound/soc/sh/rcar/adg.c +++ b/sound/soc/sh/rcar/adg.c @@ -537,16 +537,14 @@ static void rsnd_adg_get_clkout(struct rsnd_priv *priv, clk = clk_register_fixed_rate(dev, clkout_name[i], parent_clk_name, 0, req_rate); - if (!IS_ERR(clk)) { - adg->onecell.clks = adg->clkout; - adg->onecell.clk_num = CLKOUTMAX; - + adg->clkout[i] = ERR_PTR(-ENOENT); + if (!IS_ERR(clk)) adg->clkout[i] = clk; - - of_clk_add_provider(np, of_clk_src_onecell_get, - &adg->onecell); - } } + adg->onecell.clks = adg->clkout; + adg->onecell.clk_num = CLKOUTMAX; + of_clk_add_provider(np, of_clk_src_onecell_get, + &adg->onecell); } adg->ckr = ckr; |