Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 17476
b: refs/heads/master
c: 3fe0c27
h: refs/heads/master
v: v3
  • Loading branch information
Steven Rostedt authored and Ingo Molnar committed Jan 9, 2006
1 parent f79fe7c commit d401339
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 906c3b75f6c09b4693a20387aaa6aaa50d327082
refs/heads/master: 3fe0c2776113c24b4b30374003f934cf44280db5
9 changes: 5 additions & 4 deletions trunk/drivers/char/watchdog/cpu5wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <linux/init.h>
#include <linux/ioport.h>
#include <linux/timer.h>
#include <linux/completion.h>
#include <linux/jiffies.h>
#include <asm/io.h>
#include <asm/uaccess.h>
Expand Down Expand Up @@ -57,7 +58,7 @@ static int ticks = 10000;
/* some device data */

static struct {
struct semaphore stop;
struct completion stop;
volatile int running;
struct timer_list timer;
volatile int queue;
Expand Down Expand Up @@ -85,7 +86,7 @@ static void cpu5wdt_trigger(unsigned long unused)
}
else {
/* ticks doesn't matter anyway */
up(&cpu5wdt_device.stop);
complete(&cpu5wdt_device.stop);
}

}
Expand Down Expand Up @@ -239,7 +240,7 @@ static int __devinit cpu5wdt_init(void)
if ( !val )
printk(KERN_INFO PFX "sorry, was my fault\n");

init_MUTEX_LOCKED(&cpu5wdt_device.stop);
init_completion(&cpu5wdt_device.stop);
cpu5wdt_device.queue = 0;

clear_bit(0, &cpu5wdt_device.inuse);
Expand Down Expand Up @@ -269,7 +270,7 @@ static void __devexit cpu5wdt_exit(void)
{
if ( cpu5wdt_device.queue ) {
cpu5wdt_device.queue = 0;
down(&cpu5wdt_device.stop);
wait_for_completion(&cpu5wdt_device.stop);
}

misc_deregister(&cpu5wdt_misc);
Expand Down

0 comments on commit d401339

Please sign in to comment.