summaryrefslogtreecommitdiffstats
path: root/drivers/power/ab8500_fg.c
diff options
context:
space:
mode:
authorJonas Aaberg <jonas.aberg@stericsson.com>2012-05-21 16:05:01 +0200
committerLee Jones <lee.jones@linaro.org>2013-01-23 14:39:18 +0000
commit53ef1f590dc59f3c1478c68ea1f06a28f55ddccb (patch)
tree290f605ca73727e643e93b96fc67e2ec327fd37e /drivers/power/ab8500_fg.c
parentffaa39d9edd7e3d620d14d574485e814edbf3950 (diff)
downloadblackbird-op-linux-53ef1f590dc59f3c1478c68ea1f06a28f55ddccb.tar.gz
blackbird-op-linux-53ef1f590dc59f3c1478c68ea1f06a28f55ddccb.zip
ab8500-bm: Flush all work queues before suspending
Flush all workqueues at suspend time to avoid suspending during work. Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Reviewed-by: Marcus COOPER <marcus.xm.cooper@stericsson.com>
Diffstat (limited to 'drivers/power/ab8500_fg.c')
-rw-r--r--drivers/power/ab8500_fg.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/power/ab8500_fg.c b/drivers/power/ab8500_fg.c
index c791a5cef2b1..f94c9661e47e 100644
--- a/drivers/power/ab8500_fg.c
+++ b/drivers/power/ab8500_fg.c
@@ -2570,6 +2570,11 @@ static int ab8500_fg_suspend(struct platform_device *pdev,
struct ab8500_fg *di = platform_get_drvdata(pdev);
flush_delayed_work(&di->fg_periodic_work);
+ flush_work(&di->fg_work);
+ flush_work(&di->fg_acc_cur_work);
+ flush_delayed_work(&di->fg_reinit_work);
+ flush_delayed_work(&di->fg_low_bat_work);
+ flush_delayed_work(&di->fg_check_hw_failure_work);
/*
* If the FG is enabled we will disable it before going to suspend
OpenPOWER on IntegriCloud