ASoC: rsnd: fixup rsnd_ssi_master_clk_start() user count check
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 5 Feb 2019 00:46:43 +0000 (09:46 +0900)
committerMark Brown <broonie@kernel.org>
Wed, 6 Feb 2019 17:44:18 +0000 (17:44 +0000)
commitd9111d36024de07784f2e1ba2ccf70b16035f378
tree850dbea28a22a85b578af0182d8b9860155760bd
parentc16e12010060c6c7a31f08b4a99513064cb53b7d
ASoC: rsnd: fixup rsnd_ssi_master_clk_start() user count check

commit 4d230d1271064 ("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 4d230d1271064 ("ASoC: rsnd: fixup not to call clk_get/set under non-atomic")
Reported-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
Reported-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sh/rcar/ssi.c