#include "power.h"
- const char *const pm_states[PM_SUSPEND_MAX] = {
- //<20130327> <marc.huang> merge from android kernel 3.0 - add [PM_SUSPEND_ON] into pm_states
+ struct pm_sleep_state pm_states[PM_SUSPEND_MAX] = {
+#ifdef CONFIG_EARLYSUSPEND
- [PM_SUSPEND_ON] = "on",
++ [PM_SUSPEND_ON] = { .label = "on", },
+#endif
- [PM_SUSPEND_FREEZE] = "freeze",
- [PM_SUSPEND_STANDBY] = "standby",
- [PM_SUSPEND_MEM] = "mem",
+ [PM_SUSPEND_FREEZE] = { .label = "freeze", .state = PM_SUSPEND_FREEZE },
+ [PM_SUSPEND_STANDBY] = { .label = "standby", },
+ [PM_SUSPEND_MEM] = { .label = "mem", },
};
static const struct platform_suspend_ops *suspend_ops;
freeze_begin();
printk(KERN_INFO "PM: Syncing filesystems ... ");
+ #if 1
sys_sync();
+ #else /* sys_sync WQ ver2.0 use */
+ //[MTK]
+ suspend_syssync_enqueue();
+ suspend_check_sys_sync_done();
+ #endif
printk("done.\n");
- pr_debug("PM: Preparing system for %s sleep\n", pm_states[state]);
+ pr_debug("PM: Preparing system for %s sleep\n", pm_states[state].label);
error = suspend_prepare(state);
if (error)
goto Unlock;