X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fxen%2Fcore%2Freboot.c;h=8845c2ff9305b311d424b861aafeecca14dbe1ca;hb=97bf2856c6014879bd04983a3e9dfcdac1e7fe85;hp=34c3930961aea72df93a8da4747ddfc1de61ae69;hpb=76828883507a47dae78837ab5dec5a5b4513c667;p=linux-2.6.git diff --git a/drivers/xen/core/reboot.c b/drivers/xen/core/reboot.c index 34c393096..8845c2ff9 100644 --- a/drivers/xen/core/reboot.c +++ b/drivers/xen/core/reboot.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include @@ -78,8 +79,8 @@ EXPORT_SYMBOL(machine_power_off); /* Ignore multiple shutdown requests. */ static int shutting_down = SHUTDOWN_INVALID; -static void __shutdown_handler(void *unused); -static DECLARE_WORK(shutdown_work, __shutdown_handler, NULL); +static void __shutdown_handler(struct work_struct *work); +static DECLARE_DELAYED_WORK(shutdown_work, __shutdown_handler); #if defined(__i386__) || defined(__x86_64__) @@ -222,7 +223,7 @@ static int shutdown_process(void *__unused) if ((shutting_down == SHUTDOWN_POWEROFF) || (shutting_down == SHUTDOWN_HALT)) { - if (execve("/sbin/poweroff", poweroff_argv, envp) < 0) { + if (kernel_execve("/sbin/poweroff", poweroff_argv, envp) < 0) { sys_reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_POWER_OFF, @@ -249,7 +250,7 @@ static int kthread_create_on_cpu(int (*f)(void *arg), return 0; } -static void __shutdown_handler(void *unused) +static void __shutdown_handler(struct work_struct *unused) { int err; @@ -309,7 +310,7 @@ static void shutdown_handler(struct xenbus_watch *watch, } if (shutting_down != SHUTDOWN_INVALID) - schedule_work(&shutdown_work); + schedule_delayed_work(&shutdown_work, 0); kfree(str); } @@ -341,7 +342,7 @@ static void sysrq_handler(struct xenbus_watch *watch, const char **vec, #ifdef CONFIG_MAGIC_SYSRQ if (sysrq_key != '\0') - handle_sysrq(sysrq_key, NULL, NULL); + handle_sysrq(sysrq_key, NULL); #endif }