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)
commit009d196b4755b42c02414b287889a337955f7e09
tree4ee049f634119b4777490adac0a51247049a1d5b
parent6fbb32d175368b6ab8fb827e65cd8d18ed04c1f3
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