]> git.proxmox.com Git - mirror_ubuntu-kernels.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)
commit3716a891d65cc04217da1af5f2bccb7eaf6092c2
tree6585676ecffd09bbbef9827ac5653e3b2fa00cc6
parent85915b63ad8b796848f431b66c9ba5e356e722e5
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