aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
authorGrygorii Strashko <grygorii.strashko@ti.com>2012-05-25 12:35:46 +0300
committerZiyann <jaraidaniel@gmail.com>2014-10-01 12:58:41 +0200
commitb7e376e83b12fb85c3e234910f537e51f0f79019 (patch)
tree0d72ba586e509bd93cf1279ef035d5dfcbfed88d /drivers/misc
parent7b5f5f8cd7881097e2bbb7b2ae9fa897451a0599 (diff)
downloadkernel_samsung_tuna-b7e376e83b12fb85c3e234910f537e51f0f79019.zip
kernel_samsung_tuna-b7e376e83b12fb85c3e234910f537e51f0f79019.tar.gz
kernel_samsung_tuna-b7e376e83b12fb85c3e234910f537e51f0f79019.tar.bz2
MFD: twl6040-codec: cancel synch all active works on suspend
The TWL6040 vib_update work has to be canceled synchronously before continue suspending, because of: - it 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 TWL6040 device to sleep state while vib_update work is still active. Change-Id: I77b681188976378eec9242ea64dc5f001960d279 Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/twl6040-vib.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/misc/twl6040-vib.c b/drivers/misc/twl6040-vib.c
index e1adaaa..2e1d6f5 100644
--- a/drivers/misc/twl6040-vib.c
+++ b/drivers/misc/twl6040-vib.c
@@ -250,6 +250,7 @@ void vibrator_haptic_fire(int value)
static int vib_suspend(struct device *dev)
{
hrtimer_cancel(&misc_data->timer);
+ cancel_work_sync(&misc_data->vib_work);
vib_set(0);
flush_delayed_work_sync(&misc_data->power_work);