[PATCH] sysctl: frv: pm remove unnecessary insert_at_head flag
[powerpc.git] / arch / x86_64 / kernel / reboot.c
index 75235ed..2d67698 100644 (file)
@@ -6,6 +6,7 @@
 #include <linux/kernel.h>
 #include <linux/ctype.h>
 #include <linux/string.h>
+#include <linux/pm.h>
 #include <asm/io.h>
 #include <asm/kdebug.h>
 #include <asm/delay.h>
@@ -19,6 +20,7 @@
  * Power off function, if any
  */
 void (*pm_power_off)(void);
+EXPORT_SYMBOL(pm_power_off);
 
 static long no_idt[3];
 static enum { 
@@ -154,10 +156,11 @@ void machine_halt(void)
 
 void machine_power_off(void)
 {
-       if (!reboot_force) {
-               machine_shutdown();
-       }
-       if (pm_power_off)
+       if (pm_power_off) {
+               if (!reboot_force) {
+                       machine_shutdown();
+               }
                pm_power_off();
+       }
 }