ASoC: mxs-saif: fix clk_prepare() without matching clk_unprepare()
authorMans Rullgard <mans@mansr.com>
Thu, 21 Jan 2016 14:55:56 +0000 (14:55 +0000)
committerMark Brown <broonie@kernel.org>
Wed, 27 Jan 2016 13:20:45 +0000 (13:20 +0000)
commitf212c6d8c2b21c1e1d0158d38a7c37f4427f3848
tree575174911ae08cd18c05bb32e62556a3631060ba
parent92e963f50fc74041b5e9e744c330dca48e04f08d
ASoC: mxs-saif: fix clk_prepare() without matching clk_unprepare()

The clk_prepare() call in hw_params() has no matching clk_unprepare(),
leaving the clk with an ever-increasing prepare count.  Moreover,
hw_params() can be called multiple times which would again leave us
with a runaway prepare count.  Fix this by moving the clk_prepare()
call to the startup() function and adding a shutdown() function with
a matching clk_unprepare() as these operations are already correctly
bracketed by soc-core.

Signed-off-by: Mans Rullgard <mans@mansr.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/mxs/mxs-saif.c