diff options
Diffstat (limited to 'drivers/sbus')
-rw-r--r-- | drivers/sbus/char/bbc_envctrl.c | 6 | ||||
-rw-r--r-- | drivers/sbus/char/envctrl.c | 10 | ||||
-rw-r--r-- | drivers/sbus/sbus.c | 4 |
3 files changed, 7 insertions, 13 deletions
diff --git a/drivers/sbus/char/bbc_envctrl.c b/drivers/sbus/char/bbc_envctrl.c index d27e4f6d7045..a54e4140683a 100644 --- a/drivers/sbus/char/bbc_envctrl.c +++ b/drivers/sbus/char/bbc_envctrl.c @@ -4,11 +4,9 @@ * Copyright (C) 2001 David S. Miller (davem@redhat.com) */ -#include <linux/kernel.h> #include <linux/kthread.h> -#include <linux/sched.h> -#include <linux/slab.h> #include <linux/delay.h> +#include <linux/kmod.h> #include <asm/oplib.h> #include <asm/ebus.h> @@ -197,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 (kernel_execve("/sbin/shutdown", argv, envp) < 0) + if (call_usermodehelper("/sbin/shutdown", argv, envp, 0) < 0) printk(KERN_CRIT "envctrl: shutdown execution failed\n"); } diff --git a/drivers/sbus/char/envctrl.c b/drivers/sbus/char/envctrl.c index 728a133d0fc5..fff4660cdf96 100644 --- a/drivers/sbus/char/envctrl.c +++ b/drivers/sbus/char/envctrl.c @@ -20,16 +20,12 @@ */ #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> @@ -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 */ diff --git a/drivers/sbus/sbus.c b/drivers/sbus/sbus.c index 935952ef88f1..98fcbb3d5560 100644 --- a/drivers/sbus/sbus.c +++ b/drivers/sbus/sbus.c @@ -61,11 +61,11 @@ static void __init fill_sbus_device(struct device_node *dp, struct sbus_dev *sde else sdev->ofdev.dev.parent = &sdev->bus->ofdev.dev; sdev->ofdev.dev.bus = &sbus_bus_type; - strcpy(sdev->ofdev.dev.bus_id, dp->path_component_name); + sprintf(sdev->ofdev.dev.bus_id, "sbus[%08x]", dp->node); if (of_device_register(&sdev->ofdev) != 0) printk(KERN_DEBUG "sbus: device registration error for %s!\n", - sdev->ofdev.dev.bus_id); + dp->path_component_name); } static void __init sbus_bus_ranges_init(struct device_node *dp, struct sbus_bus *sbus) |