Merge branch 'master' into for_paulus
[linux-drm-fsl-dcu.git] / drivers / sbus / char / envctrl.c
index 728a133d0fc5b7c306443280e63d296e047cc5dc..2cea4f5d2084b13f85da8114ef554ced2c47b5d9 100644 (file)
  */
 
 #include <linux/module.h>
-#include <linux/sched.h>
+#include <linux/init.h>
 #include <linux/kthread.h>
-#include <linux/errno.h>
 #include <linux/delay.h>
 #include <linux/ioport.h>
-#include <linux/init.h>
 #include <linux/miscdevice.h>
-#include <linux/mm.h>
-#include <linux/slab.h>
-#include <linux/kernel.h>
+#include <linux/kmod.h>
 
 #include <asm/ebus.h>
 #include <asm/uaccess.h>
@@ -709,7 +705,7 @@ envctrl_release(struct inode *inode, struct file *file)
        return 0;
 }
 
-static struct file_operations envctrl_fops = {
+static const struct file_operations envctrl_fops = {
        .owner =                THIS_MODULE,
        .read =                 envctrl_read,
        .unlocked_ioctl =       envctrl_ioctl,
@@ -980,7 +976,7 @@ static void envctrl_do_shutdown(void)
 
        inprog = 1;
        printk(KERN_CRIT "kenvctrld: WARNING: Shutting down the system now.\n");
-       ret = kernel_execve("/sbin/shutdown", argv, envp);
+       ret = call_usermodehelper("/sbin/shutdown", argv, envp, 0);
        if (ret < 0) {
                printk(KERN_CRIT "kenvctrld: WARNING: system shutdown failed!\n"); 
                inprog = 0;  /* unlikely to succeed, but we could try again */