]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/sbus/char/envctrl.c
Merge branch 'for-bfields' of git://linux-nfs.org/~tomtucker/xprt-switch-2.6 into...
[linux-2.6-omap-h63xx.git] / drivers / sbus / char / envctrl.c
index f2be2ead87426d7ca70443aeeb70d21b5eedb55d..dadabef116b60ea75d935b37254ca53eeff2e09a 100644 (file)
 #include <linux/ioport.h>
 #include <linux/miscdevice.h>
 #include <linux/kmod.h>
+#include <linux/reboot.h>
 
 #include <asm/ebus.h>
 #include <asm/uaccess.h>
 #include <asm/envctrl.h>
+#include <asm/io.h>
 
 #define ENVCTRL_MINOR  162
 
@@ -965,10 +967,6 @@ static struct i2c_child_t *envctrl_get_i2c_child(unsigned char mon_type)
 static void envctrl_do_shutdown(void)
 {
        static int inprog = 0;
-       static char *envp[] = { 
-               "HOME=/", "TERM=linux", "PATH=/sbin:/usr/sbin:/bin:/usr/bin", NULL };
-       char *argv[] = { 
-               "/sbin/shutdown", "-h", "now", NULL };  
        int ret;
 
        if (inprog != 0)
@@ -976,7 +974,7 @@ static void envctrl_do_shutdown(void)
 
        inprog = 1;
        printk(KERN_CRIT "kenvctrld: WARNING: Shutting down the system now.\n");
-       ret = call_usermodehelper("/sbin/shutdown", argv, envp, 0);
+       ret = orderly_poweroff(true);
        if (ret < 0) {
                printk(KERN_CRIT "kenvctrld: WARNING: system shutdown failed!\n"); 
                inprog = 0;  /* unlikely to succeed, but we could try again */