aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrygorii Strashko <grygorii.strashko@ti.com>2012-05-25 12:29:24 +0300
committerZiyann <jaraidaniel@gmail.com>2014-10-01 13:00:18 +0200
commitfc7c611df739818e4c2866fb10b2a4c87bb654a1 (patch)
tree784b657c502a06b18818199e66a84eb0427731dd
parentd55f1a0db696c24b08b5060fc56244ad92d04ba0 (diff)
downloadkernel_samsung_tuna-fc7c611df739818e4c2866fb10b2a4c87bb654a1.zip
kernel_samsung_tuna-fc7c611df739818e4c2866fb10b2a4c87bb654a1.tar.gz
kernel_samsung_tuna-fc7c611df739818e4c2866fb10b2a4c87bb654a1.tar.bz2
MFD: TWL6030: cancel synch all active works on suspend
The TWL6030 battery works have to be canceled synchronously before continue suspending, because of: - they may sleep while accessing to I2C bus and, as result, WFI may be reached in the middle of its execution and that may prevent system from entering to OFF state. - the device suspend handler may switch TWL6030 device to sleep state while their works are still active. Change-Id: Ie3ef579e05bded049e39f9186acb01b116283c87 Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
-rw-r--r--drivers/power/twl6030_bci_battery.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/power/twl6030_bci_battery.c b/drivers/power/twl6030_bci_battery.c
index e246677..6033c36 100644
--- a/drivers/power/twl6030_bci_battery.c
+++ b/drivers/power/twl6030_bci_battery.c
@@ -2520,8 +2520,8 @@ static int twl6030_bci_battery_suspend(struct device *dev)
if (ret)
goto err;
- cancel_delayed_work(&di->twl6030_bci_monitor_work);
- cancel_delayed_work(&di->twl6030_current_avg_work);
+ cancel_delayed_work_sync(&di->twl6030_bci_monitor_work);
+ cancel_delayed_work_sync(&di->twl6030_current_avg_work);
/* We cannot tolarate a sleep longer than 30 seconds
* while on ac charging we have to reset the BQ watchdog timer.