Commit 1e5d4962 authored by David S. Miller's avatar David S. Miller

Merge nuts.davemloft.net:/disk1/davem/BK/sparcwork-2.6

into nuts.davemloft.net:/disk1/davem/BK/sparc-2.6
parents 4093261b 6f7d8d35
...@@ -29,8 +29,8 @@ static int button_pressed; ...@@ -29,8 +29,8 @@ static int button_pressed;
static irqreturn_t power_handler(int irq, void *dev_id, struct pt_regs *regs) static irqreturn_t power_handler(int irq, void *dev_id, struct pt_regs *regs)
{ {
if (button_pressed == 0) { if (button_pressed == 0) {
wake_up(&powerd_wait);
button_pressed = 1; button_pressed = 1;
wake_up(&powerd_wait);
} }
/* FIXME: Check registers for status... */ /* FIXME: Check registers for status... */
...@@ -86,10 +86,10 @@ static int powerd(void *__unused) ...@@ -86,10 +86,10 @@ static int powerd(void *__unused)
remove_wait_queue(&powerd_wait, &wait); remove_wait_queue(&powerd_wait, &wait);
/* Ok, down we go... */ /* Ok, down we go... */
button_pressed = 0;
if (execve("/sbin/shutdown", argv, envp) < 0) { if (execve("/sbin/shutdown", argv, envp) < 0) {
printk("powerd: shutdown execution failed\n"); printk("powerd: shutdown execution failed\n");
add_wait_queue(&powerd_wait, &wait); add_wait_queue(&powerd_wait, &wait);
button_pressed = 0;
goto again; goto again;
} }
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment