Commit cf9d5c66 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

ASoC: rsnd: tidyup loop on rsnd_adg_clk_query()

commit 06e8f5c8 ("ASoC: rsnd: don't call clk_get_rate() under
atomic context") used saved clk_rate, thus for_each_rsnd_clk()
is no longer needed. This patch fixes it.

Fixes: 06e8f5c8 ("ASoC: rsnd: don't call clk_get_rate() under atomic context")
Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87v978oe2u.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 17c2d247
...@@ -290,7 +290,6 @@ static void rsnd_adg_set_ssi_clk(struct rsnd_mod *ssi_mod, u32 val) ...@@ -290,7 +290,6 @@ static void rsnd_adg_set_ssi_clk(struct rsnd_mod *ssi_mod, u32 val)
int rsnd_adg_clk_query(struct rsnd_priv *priv, unsigned int rate) int rsnd_adg_clk_query(struct rsnd_priv *priv, unsigned int rate)
{ {
struct rsnd_adg *adg = rsnd_priv_to_adg(priv); struct rsnd_adg *adg = rsnd_priv_to_adg(priv);
struct clk *clk;
int i; int i;
int sel_table[] = { int sel_table[] = {
[CLKA] = 0x1, [CLKA] = 0x1,
...@@ -303,10 +302,9 @@ int rsnd_adg_clk_query(struct rsnd_priv *priv, unsigned int rate) ...@@ -303,10 +302,9 @@ int rsnd_adg_clk_query(struct rsnd_priv *priv, unsigned int rate)
* find suitable clock from * find suitable clock from
* AUDIO_CLKA/AUDIO_CLKB/AUDIO_CLKC/AUDIO_CLKI. * AUDIO_CLKA/AUDIO_CLKB/AUDIO_CLKC/AUDIO_CLKI.
*/ */
for_each_rsnd_clk(clk, adg, i) { for (i = 0; i < CLKMAX; i++)
if (rate == adg->clk_rate[i]) if (rate == adg->clk_rate[i])
return sel_table[i]; return sel_table[i];
}
/* /*
* find divided clock from BRGA/BRGB * find divided clock from BRGA/BRGB
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment