git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add common orderly_poweroff()
[pandora-kernel.git]
/
drivers
/
sbus
/
char
/
bbc_envctrl.c
diff --git
a/drivers/sbus/char/bbc_envctrl.c
b/drivers/sbus/char/bbc_envctrl.c
index
a54e414
..
e821a15
100644
(file)
--- a/
drivers/sbus/char/bbc_envctrl.c
+++ b/
drivers/sbus/char/bbc_envctrl.c
@@
-7,6
+7,7
@@
#include <linux/kthread.h>
#include <linux/delay.h>
#include <linux/kmod.h>
#include <linux/kthread.h>
#include <linux/delay.h>
#include <linux/kmod.h>
+#include <linux/reboot.h>
#include <asm/oplib.h>
#include <asm/ebus.h>
#include <asm/oplib.h>
#include <asm/ebus.h>
@@
-170,8
+171,6
@@
static void get_current_temps(struct bbc_cpu_temperature *tp)
static void do_envctrl_shutdown(struct bbc_cpu_temperature *tp)
{
static int shutting_down = 0;
static void do_envctrl_shutdown(struct bbc_cpu_temperature *tp)
{
static int shutting_down = 0;
- static char *envp[] = { "HOME=/", "TERM=linux", "PATH=/sbin:/usr/sbin:/bin:/usr/bin", NULL };
- char *argv[] = { "/sbin/shutdown", "-h", "now", NULL };
char *type = "???";
s8 val = -1;
char *type = "???";
s8 val = -1;
@@
-195,7
+194,7
@@
static void do_envctrl_shutdown(struct bbc_cpu_temperature *tp)
printk(KERN_CRIT "kenvctrld: Shutting down the system now.\n");
shutting_down = 1;
printk(KERN_CRIT "kenvctrld: Shutting down the system now.\n");
shutting_down = 1;
- if (
call_usermodehelper("/sbin/shutdown", argv, envp, 0
) < 0)
+ if (
orderly_poweroff(true
) < 0)
printk(KERN_CRIT "envctrl: shutdown execution failed\n");
}
printk(KERN_CRIT "envctrl: shutdown execution failed\n");
}