swsusp: fix hibernation code ordering
[deliverable/linux.git] / kernel / power / main.c
index 8812985f30296cd01aab981337fcf90f95b14ff4..fc45ed22620f46c8a84341e51069892cab3e93fa 100644 (file)
@@ -15,7 +15,6 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/init.h>
-#include <linux/pm.h>
 #include <linux/console.h>
 #include <linux/cpu.h>
 #include <linux/resume-trace.h>
@@ -97,6 +96,11 @@ static int suspend_prepare(suspend_state_t state)
                }
        }
 
+       if (pm_ops->set_target) {
+               error = pm_ops->set_target(state);
+               if (error)
+                       goto Thaw;
+       }
        suspend_console();
        error = device_suspend(PMSG_SUSPEND);
        if (error) {
This page took 0.035062 seconds and 5 git commands to generate.