[PATCH] more kernel_execve() fallout (sbus)
[sfrench/cifs-2.6.git] / drivers / sbus / char / bbc_envctrl.c
index d44205d52bf3ce7a69a0da0678c0fe0d377f10d9..0d3660c28f7d496840598b908ff909ec753c8c7a 100644 (file)
@@ -4,17 +4,11 @@
  * Copyright (C) 2001 David S. Miller (davem@redhat.com)
  */
 
-#define __KERNEL_SYSCALLS__
-
-#include <linux/kernel.h>
 #include <linux/kthread.h>
-#include <linux/sched.h>
-#include <linux/slab.h>
+#include <linux/syscalls.h>
 #include <linux/delay.h>
 #include <asm/oplib.h>
 #include <asm/ebus.h>
-static int errno;
-#include <asm/unistd.h>
 
 #include "bbc_i2c.h"
 #include "max1617.h"
@@ -201,7 +195,7 @@ static void do_envctrl_shutdown(struct bbc_cpu_temperature *tp)
        printk(KERN_CRIT "kenvctrld: Shutting down the system now.\n");
 
        shutting_down = 1;
-       if (execve("/sbin/shutdown", argv, envp) < 0)
+       if (kernel_execve("/sbin/shutdown", argv, envp) < 0)
                printk(KERN_CRIT "envctrl: shutdown execution failed\n");
 }
 
@@ -576,9 +570,9 @@ int bbc_envctrl_init(void)
        int devidx = 0;
 
        while ((echild = bbc_i2c_getdev(devidx++)) != NULL) {
-               if (!strcmp(echild->prom_name, "temperature"))
+               if (!strcmp(echild->prom_node->name, "temperature"))
                        attach_one_temp(echild, temp_index++);
-               if (!strcmp(echild->prom_name, "fan-control"))
+               if (!strcmp(echild->prom_node->name, "fan-control"))
                        attach_one_fan(echild, fan_index++);
        }
        if (temp_index != 0 && fan_index != 0) {