diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/i386/kernel/reboot.c | 7 | ||||
-rw-r--r-- | arch/x86_64/kernel/reboot.c | 10 |
2 files changed, 10 insertions, 7 deletions
diff --git a/arch/i386/kernel/reboot.c b/arch/i386/kernel/reboot.c index 2fa5803a759d..d207242976d3 100644 --- a/arch/i386/kernel/reboot.c +++ b/arch/i386/kernel/reboot.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/efi.h> | 12 | #include <linux/efi.h> |
13 | #include <linux/dmi.h> | 13 | #include <linux/dmi.h> |
14 | #include <linux/ctype.h> | 14 | #include <linux/ctype.h> |
15 | #include <linux/pm.h> | ||
15 | #include <asm/uaccess.h> | 16 | #include <asm/uaccess.h> |
16 | #include <asm/apic.h> | 17 | #include <asm/apic.h> |
17 | #include <asm/desc.h> | 18 | #include <asm/desc.h> |
@@ -355,10 +356,10 @@ void machine_halt(void) | |||
355 | 356 | ||
356 | void machine_power_off(void) | 357 | void machine_power_off(void) |
357 | { | 358 | { |
358 | machine_shutdown(); | 359 | if (pm_power_off) { |
359 | 360 | machine_shutdown(); | |
360 | if (pm_power_off) | ||
361 | pm_power_off(); | 361 | pm_power_off(); |
362 | } | ||
362 | } | 363 | } |
363 | 364 | ||
364 | 365 | ||
diff --git a/arch/x86_64/kernel/reboot.c b/arch/x86_64/kernel/reboot.c index 75235ed2b31b..57117b8beb2b 100644 --- a/arch/x86_64/kernel/reboot.c +++ b/arch/x86_64/kernel/reboot.c | |||
@@ -6,6 +6,7 @@ | |||
6 | #include <linux/kernel.h> | 6 | #include <linux/kernel.h> |
7 | #include <linux/ctype.h> | 7 | #include <linux/ctype.h> |
8 | #include <linux/string.h> | 8 | #include <linux/string.h> |
9 | #include <linux/pm.h> | ||
9 | #include <asm/io.h> | 10 | #include <asm/io.h> |
10 | #include <asm/kdebug.h> | 11 | #include <asm/kdebug.h> |
11 | #include <asm/delay.h> | 12 | #include <asm/delay.h> |
@@ -154,10 +155,11 @@ void machine_halt(void) | |||
154 | 155 | ||
155 | void machine_power_off(void) | 156 | void machine_power_off(void) |
156 | { | 157 | { |
157 | if (!reboot_force) { | 158 | if (pm_power_off) { |
158 | machine_shutdown(); | 159 | if (!reboot_force) { |
159 | } | 160 | machine_shutdown(); |
160 | if (pm_power_off) | 161 | } |
161 | pm_power_off(); | 162 | pm_power_off(); |
163 | } | ||
162 | } | 164 | } |
163 | 165 | ||