]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: sun4i-codec: Enable bus clock after getting GPIO
authorChen-Yu Tsai <wens@csie.org>
Tue, 1 Nov 2016 06:31:55 +0000 (14:31 +0800)
committerMark Brown <broonie@kernel.org>
Tue, 1 Nov 2016 20:03:41 +0000 (14:03 -0600)
commitbda933c790a7ce509dfc911ae2979b3c3d7a0a09
tree6585676ecffd09bbbef9827ac5653e3b2fa00cc6
parentcf6d29a4b91d6bc88c0a4c8d3d5541ba69b7d55d
ASoC: sun4i-codec: Enable bus clock after getting GPIO

In the current probe function the GPIO is acquired after the codec's
bus clock is enabled. However if it fails to acquire the GPIO due to
a deferred probe, it does not disable the bus clock before bailing out.
This would result in the clock being enabled multiple times.

Move the code that enables the bus clock after the part that gets the
GPIO, maintaining a separation between resource acquisition and device
enablement in the probe function.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sunxi/sun4i-codec.c