aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/reset.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/kernel/reset.c')
-rw-r--r--arch/mips/kernel/reset.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/arch/mips/kernel/reset.c b/arch/mips/kernel/reset.c
index 5e37df3111ad..621037db2290 100644
--- a/arch/mips/kernel/reset.c
+++ b/arch/mips/kernel/reset.c
@@ -3,17 +3,16 @@
3 * License. See the file "COPYING" in the main directory of this archive 3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details. 4 * for more details.
5 * 5 *
6 * Copyright (C) 2001 by Ralf Baechle 6 * Copyright (C) 2001, 06 by Ralf Baechle (ralf@linux-mips.org)
7 * Copyright (C) 2001 MIPS Technologies, Inc. 7 * Copyright (C) 2001 MIPS Technologies, Inc.
8 */ 8 */
9#include <linux/kernel.h> 9#include <linux/kernel.h>
10#include <linux/module.h> 10#include <linux/module.h>
11#include <linux/pm.h>
11#include <linux/types.h> 12#include <linux/types.h>
12#include <linux/reboot.h> 13#include <linux/reboot.h>
13#include <asm/reboot.h>
14 14
15void (*pm_power_off)(void); 15#include <asm/reboot.h>
16EXPORT_SYMBOL(pm_power_off);
17 16
18/* 17/*
19 * Urgs ... Too many MIPS machines to handle this in a generic way. 18 * Urgs ... Too many MIPS machines to handle this in a generic way.
@@ -22,23 +21,22 @@ EXPORT_SYMBOL(pm_power_off);
22 */ 21 */
23void (*_machine_restart)(char *command); 22void (*_machine_restart)(char *command);
24void (*_machine_halt)(void); 23void (*_machine_halt)(void);
25void (*_machine_power_off)(void); 24void (*pm_power_off)(void);
26 25
27void machine_restart(char *command) 26void machine_restart(char *command)
28{ 27{
29 _machine_restart(command); 28 if (_machine_restart)
29 _machine_restart(command);
30} 30}
31 31
32void machine_halt(void) 32void machine_halt(void)
33{ 33{
34 _machine_halt(); 34 if (_machine_halt)
35 _machine_halt();
35} 36}
36 37
37void machine_power_off(void) 38void machine_power_off(void)
38{ 39{
39 if (pm_power_off) 40 if (pm_power_off)
40 pm_power_off(); 41 pm_power_off();
41
42 _machine_power_off();
43} 42}
44