/** * suspend_prepare - Do prep work before entering low-power state. * * This is common code that is called for each state that we're entering. * Run suspend notifiers, allocate a console and stop all processes. */ static int suspend_prepare(void) { int error; if (!suspend_ops || !suspend_ops->enter) return -EPERM; pm_prepare_console(); error = pm_notifier_call_chain(PM_SUSPEND_PREPARE); if (error) goto Finish; error = usermodehelper_disable(); if (error) goto Finish; #if defined(CONFIG_MACH_ACER_A9) kernel_enter_fast_dormancy(); #endif error = suspend_freeze_processes(); if (!error) return 0; suspend_thaw_processes(); usermodehelper_enable(); Finish: pm_notifier_call_chain(PM_POST_SUSPEND); pm_restore_console(); return error; }
/** * suspend_prepare - Prepare for entering system sleep state. * * Common code run for every system sleep state that can be entered (except for * hibernation). Run suspend notifiers, allocate the "suspend" console and * freeze processes. */ static int suspend_prepare(void) { int error; if (!suspend_ops || !suspend_ops->enter) return -EPERM; pm_prepare_console(); error = pm_notifier_call_chain(PM_SUSPEND_PREPARE); if (error) goto Finish; #if defined(CONFIG_ARCH_ACER_MSM8960) kernel_enter_fast_dormancy(); #endif error = suspend_freeze_processes(); if (!error) return 0; suspend_stats.failed_freeze++; dpm_save_failed_step(SUSPEND_FREEZE); Finish: pm_notifier_call_chain(PM_POST_SUSPEND); pm_restore_console(); return error; }
static void msm_rmnet_fast_dormancy_work_f(struct work_struct *work) { kernel_enter_fast_dormancy(); }