]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: twl6040: Simplify code in out_drv_event for pending work check
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Thu, 29 Sep 2011 12:22:37 +0000 (15:22 +0300)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 30 Sep 2011 12:55:08 +0000 (13:55 +0100)
commit5cef899974fd20ca58de7bbec8387c82efcaf3ab
tree4ee049f634119b4777490adac0a51247049a1d5b
parentaaf4589c705dfcb7fd9fd139bed9d9383899bf4d
ASoC: twl6040: Simplify code in out_drv_event for pending work check

Instead of checking, if the work is pending, it is safer to cancel
the pending work, or wait till the scheduled work finishes.
This way we can avoid modifying the variables used by the work
function.
Since we know that no work is pending, we can remove the two additional
checks in POST_PMU, and PRE_PMD for non pending works.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/codecs/twl6040.c