]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit014f5449da0b194067212cbcb82b47e0c689a967
tree575174911ae08cd18c05bb32e62556a3631060ba
parentd7e15052ecc9ac4f938d1d7432c1d120a2711a7e
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