Skip to content

Commit

Permalink
ASoC: rsnd: fixup rsnd_ssi_master_clk_start() user count check
Browse files Browse the repository at this point in the history
commit 4d230d1 ("ASoC: rsnd: fixup not to call clk_get/set
under non-atomic") added new rsnd_ssi_prepare() and moved
rsnd_ssi_master_clk_start() to .prepare.
But, ssi user count (= ssi->usrcnt) is incremented at .init
(= rsnd_ssi_init()).
Because of these timing exchange, ssi->usrcnt check at
rsnd_ssi_master_clk_start() should be adjusted.
Otherwise, 2nd master clock setup will be no check.
This patch fixup this issue.

Fixes: commit 4d230d1 ("ASoC: rsnd: fixup not to call clk_get/set under non-atomic")
Reported-by: Yusuke Goda <[email protected]>
Reported-by: Valentine Barshak <[email protected]>
Signed-off-by: Kuninori Morimoto <[email protected]>
Tested-by: Yusuke Goda <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
morimoto authored and broonie committed Feb 6, 2019
1 parent c16e120 commit d9111d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/soc/sh/rcar/ssi.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ static int rsnd_ssi_master_clk_start(struct rsnd_mod *mod,
if (rsnd_ssi_is_multi_slave(mod, io))
return 0;

if (ssi->usrcnt > 1) {
if (ssi->usrcnt > 0) {
if (ssi->rate != rate) {
dev_err(dev, "SSI parent/child should use same rate\n");
return -EINVAL;
Expand Down

0 comments on commit d9111d3

Please sign in to comment.