BZ: 18955
The phone is very slow to wake up if press PWR key during camera postview
sys_sync option has a race condition with the late_resume_work.
Using wakeup_flusher_threads(0) to replace sys_sync.
since wakeup_flusher_threads(0) won't block the resume option.
Signed-off-by: Xiaobing Tu <xiaobing.tu@intel.com>
Change-Id: I4bbe017a65f56afbc058b28c8cce8db4512e4907
Orig-Change-Id: Id33abbf7eda4167b17ace16309fca530d3815f70
Reviewed-on: http://android.intel.com:8080/29663
Reviewed-by: Zhang, Yanmin <yanmin.zhang@intel.com>
Reviewed-by: Tu, Xiaobing <xiaobing.tu@intel.com>
Reviewed-by: Mansoor, Illyas <illyas.mansoor@intel.com>
Reviewed-by: Hogander, Jouni <jouni.hogander@intel.com>
Tested-by: Martin, LoicX <loicx.martin@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
Reviewed-on: http://android.intel.com:8080/30511
Reviewed-by: Lampila, KalleX <kallex.lampila@intel.com>
Reviewed-by: Koski, Anttu <anttu.koski@intel.com>
Tested-by: Koski, Anttu <anttu.koski@intel.com>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/rtc.h>
-#include <linux/syscalls.h> /* sys_sync */
+#include <linux/writeback.h>
#include <linux/wakelock.h>
#include <linux/workqueue.h>
}
}
mutex_unlock(&early_suspend_lock);
-
- if (debug_mask & DEBUG_SUSPEND)
- pr_info("early_suspend: sync\n");
-
- sys_sync();
+ if(debug_mask & DEBUG_SUSPEND)
+ pr_info("early_suspend: after call handlers\n");
+ /* just wake up flusher to start write back and don't wait it finished*/
+ wakeup_flusher_threads(0);
abort:
spin_lock_irqsave(&state_lock, irqflags);
if (state == SUSPEND_REQUESTED_AND_SUSPENDED)