diff options
author | Kyle McMartin <kyle@parisc-linux.org> | 2006-01-18 00:33:32 -0500 |
---|---|---|
committer | Kyle McMartin <kyle@duet.int.mcmartin.ca> | 2006-01-22 20:26:50 -0500 |
commit | 85509c00073d4bdd1f4b7796180a15198f2e62da (patch) | |
tree | 0249b9515dac45bd2adb645e05706eee0ef807e3 /arch | |
parent | 526110f8c8d2326413e2de5496d196ee9d4856ad (diff) |
[PARISC] Add chassis_power_off routine
Define a chassis_power_off routine that machines which have a way
to turn off the power supply can hook into. Formerly they were
using pm_power_off, which is now being used by generic code. Make
lasi.c use chassis_power_off instead of pm_power_off.
Note, all machines need to call machine_power_off so that the
switch can power off the machine, though halt -p may not necessarily
be able to work properly on the machine.
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/parisc/kernel/process.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c index 998700ce4556..e8dea4177113 100644 --- a/arch/parisc/kernel/process.c +++ b/arch/parisc/kernel/process.c | |||
@@ -54,12 +54,6 @@ | |||
54 | #include <asm/uaccess.h> | 54 | #include <asm/uaccess.h> |
55 | #include <asm/unwind.h> | 55 | #include <asm/unwind.h> |
56 | 56 | ||
57 | /* | ||
58 | * Power off function, if any | ||
59 | */ | ||
60 | void (*pm_power_off)(void); | ||
61 | EXPORT_SYMBOL(pm_power_off); | ||
62 | |||
63 | void default_idle(void) | 57 | void default_idle(void) |
64 | { | 58 | { |
65 | barrier(); | 59 | barrier(); |
@@ -142,6 +136,7 @@ void machine_halt(void) | |||
142 | */ | 136 | */ |
143 | } | 137 | } |
144 | 138 | ||
139 | void (*chassis_power_off)(void); | ||
145 | 140 | ||
146 | /* | 141 | /* |
147 | * This routine is called from sys_reboot to actually turn off the | 142 | * This routine is called from sys_reboot to actually turn off the |
@@ -150,8 +145,8 @@ void machine_halt(void) | |||
150 | void machine_power_off(void) | 145 | void machine_power_off(void) |
151 | { | 146 | { |
152 | /* If there is a registered power off handler, call it. */ | 147 | /* If there is a registered power off handler, call it. */ |
153 | if(pm_power_off) | 148 | if (chassis_power_off) |
154 | pm_power_off(); | 149 | chassis_power_off(); |
155 | 150 | ||
156 | /* Put the soft power button back under hardware control. | 151 | /* Put the soft power button back under hardware control. |
157 | * If the user had already pressed the power button, the | 152 | * If the user had already pressed the power button, the |
@@ -167,6 +162,8 @@ void machine_power_off(void) | |||
167 | KERN_EMERG "Please power this system off now."); | 162 | KERN_EMERG "Please power this system off now."); |
168 | } | 163 | } |
169 | 164 | ||
165 | void (*pm_power_off)(void) = machine_power_off; | ||
166 | EXPORT_SYMBOL(pm_power_off); | ||
170 | 167 | ||
171 | /* | 168 | /* |
172 | * Create a kernel thread | 169 | * Create a kernel thread |