]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: tegra+wm8903: simplify gpio tests in widget callbacks
authorStephen Warren <swarren@nvidia.com>
Tue, 22 May 2012 22:08:53 +0000 (16:08 -0600)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Sun, 3 Jun 2012 12:06:37 +0000 (13:06 +0100)
commit7018c8f78114e0b212c15a0f2ae17150ef03800b
tree243bc6bc30b7fe3faee0d6ce3b15e34fc99ebe89
parent32c055c244bbc003323829b0e1b56383d1732159
ASoC: tegra+wm8903: simplify gpio tests in widget callbacks

By the time any widget callbacks could be called, if the GPIO ID they
will manipulate is valid, it must have already been requested, or the
card would have failed to probe or initialize. So, testing for GPIO
validity is equivalent to testing whether the GPIO was successfully
requested at this point in the code. Making this change will allow later
patches to remove the gpio_requested variable.

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