]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: tegra+alc5632: unconditionally free jack GPIOs in remove
authorStephen Warren <swarren@nvidia.com>
Tue, 22 May 2012 22:09:52 +0000 (16:09 -0600)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Sun, 3 Jun 2012 12:06:37 +0000 (13:06 +0100)
commit54e3cd333c77bcfacf7efb64af9c97bc67e12139
tree383854c3d9f738acafc04dd4b25ed6c45504f4a3
parent7ab7720c1a302435c66a12868c26348a272cde3e
ASoC: tegra+alc5632: unconditionally free jack GPIOs in remove

The headphone jack GPIOs are added/initialized in the DAI link's init()
method, and hence in theory may not always have been added before remove()
is called in some unusual cases. In order to prevent calling
snd_soc_jack_free_gpios() if snd_soc_jack_add_gpios() had not been, the
code kept track of the initialization state to avoid the free call when
necessary.

However, it appears that snd_soc_jack_free_gpios() is robust in the face
of being called without snd_soc_jack_add_gpios() first succeeding, so
there is little point manually tracking this information. Hence, remove
the tracking code. All other machine drivers already operate this way.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/tegra/tegra_alc5632.c