Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 107866
b: refs/heads/master
c: 12b7a15
h: refs/heads/master
v: v3
  • Loading branch information
Wim Van Sebroeck committed Aug 6, 2008
1 parent 972aed6 commit 59851ee
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 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: 0c06090c9472db0525cb6fe229c3bea33bbbbb3c
refs/heads/master: 12b7a1523eda9cd72362fdda928ddb995ecdc06d
16 changes: 11 additions & 5 deletions trunk/drivers/watchdog/sbc8360.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,13 @@ static void sbc8360_ping(void)
outb(wd_margin, SBC8360_BASETIME);
}

/* stop watchdog */
static void sbc8360_stop(void)
{
/* De-activate the watchdog */
outb(0, SBC8360_ENABLE);
}

/* Userspace pings kernel driver, or requests clean close */
static ssize_t sbc8360_write(struct file *file, const char __user *buf,
size_t count, loff_t *ppos)
Expand Down Expand Up @@ -271,7 +278,7 @@ static int sbc8360_open(struct inode *inode, struct file *file)
static int sbc8360_close(struct inode *inode, struct file *file)
{
if (expect_close == 42)
outb(0, SBC8360_ENABLE);
sbc8360_stop();
else
printk(KERN_CRIT PFX
"SBC8360 device closed unexpectedly. SBC8360 will not stop!\n");
Expand All @@ -288,10 +295,9 @@ static int sbc8360_close(struct inode *inode, struct file *file)
static int sbc8360_notify_sys(struct notifier_block *this, unsigned long code,
void *unused)
{
if (code == SYS_DOWN || code == SYS_HALT) {
/* Disable the SBC8360 Watchdog */
outb(0, SBC8360_ENABLE);
}
if (code == SYS_DOWN || code == SYS_HALT)
sbc8360_stop(); /* Disable the SBC8360 Watchdog */

return NOTIFY_DONE;
}

Expand Down

0 comments on commit 59851ee

Please sign in to comment.