Skip to content

Commit

Permalink
ASoC: rt5682: clock driver must use the clock provider API
Browse files Browse the repository at this point in the history
Clock drivers ops should not call the clk API but the clock provider
(clk_hw) instead.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://lore.kernel.org/r/20210421120512.413057-4-jbrunet@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Jerome Brunet authored and Mark Brown committed Apr 23, 2021
1 parent 104c3a9 commit 8691743
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sound/soc/codecs/rt5682.c
Original file line number Diff line number Diff line change
Expand Up @@ -2634,7 +2634,7 @@ static int rt5682_wclk_set_rate(struct clk_hw *hw, unsigned long rate,
container_of(hw, struct rt5682_priv,
dai_clks_hw[RT5682_DAI_WCLK_IDX]);
struct snd_soc_component *component = rt5682->component;
struct clk *parent_clk;
struct clk_hw *parent_hw;
const char * const clk_name = clk_hw_get_name(hw);
int pre_div;
unsigned int clk_pll2_out;
Expand All @@ -2649,8 +2649,8 @@ static int rt5682_wclk_set_rate(struct clk_hw *hw, unsigned long rate,
*
* It will set the codec anyway by assuming mclk is 48MHz.
*/
parent_clk = clk_get_parent(hw->clk);
if (!parent_clk)
parent_hw = clk_hw_get_parent(hw);
if (!parent_hw)
dev_warn(component->dev,
"Parent mclk of wclk not acquired in driver. Please ensure mclk was provided as %d Hz.\n",
CLK_PLL2_FIN);
Expand Down

0 comments on commit 8691743

Please sign in to comment.