Skip to content

Commit

Permalink
Merge series "ASoC: Revert clk_hw_get_clk() cleanup" from Jerome Brun…
Browse files Browse the repository at this point in the history
…et <jbrunet@baylibre.com>:

There is problem with clk_hw_get_hw(). Using it pins the clock provider to
itself, making it impossible to remove the related module.

Revert the two commits using this function until this gets sorted out.

Jerome Brunet (2):
  ASoC: stm32: do not request a new clock consummer reference
  ASoC: da7219: do not request a new clock consummer reference

 sound/soc/codecs/da7219.c     | 5 +----
 sound/soc/stm/stm32_sai_sub.c | 5 +----
 2 files changed, 2 insertions(+), 8 deletions(-)

--
2.31.1
  • Loading branch information
Mark Brown committed Apr 28, 2021
2 parents 6879e8e + 97c7336 commit 9a5e12b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions sound/soc/codecs/da7219.c
Original file line number Diff line number Diff line change
Expand Up @@ -2181,10 +2181,7 @@ static int da7219_register_dai_clks(struct snd_soc_component *component)
ret);
goto err;
}

da7219->dai_clks[i] = devm_clk_hw_get_clk(dev, dai_clk_hw, NULL);
if (IS_ERR(da7219->dai_clks[i]))
return PTR_ERR(da7219->dai_clks[i]);
da7219->dai_clks[i] = dai_clk_hw->clk;

/* For DT setup onecell data, otherwise create lookup */
if (np) {
Expand Down
5 changes: 1 addition & 4 deletions sound/soc/stm/stm32_sai_sub.c
Original file line number Diff line number Diff line change
Expand Up @@ -484,10 +484,7 @@ static int stm32_sai_add_mclk_provider(struct stm32_sai_sub_data *sai)
dev_err(dev, "mclk register returned %d\n", ret);
return ret;
}

sai->sai_mclk = devm_clk_hw_get_clk(dev, hw, NULL);
if (IS_ERR(sai->sai_mclk))
return PTR_ERR(sai->sai_mclk);
sai->sai_mclk = hw->clk;

/* register mclk provider */
return devm_of_clk_add_hw_provider(dev, of_clk_hw_simple_get, hw);
Expand Down

0 comments on commit 9a5e12b

Please sign in to comment.