Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 133783
b: refs/heads/master
c: 3b9d49e
h: refs/heads/master
i:
  133781: 6b06b0f
  133779: 645b529
  133775: efc0e7b
v: v3
  • Loading branch information
Wim Van Sebroeck committed Mar 25, 2009
1 parent b80ae13 commit 6c5a4d5
Show file tree
Hide file tree
Showing 2 changed files with 7 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: 0426fd0d88a595a8ab18e0cd69bdfe82a4d15115
refs/heads/master: 3b9d49eea1c32e529fa932670a53358e1c8cd67e
10 changes: 6 additions & 4 deletions trunk/drivers/watchdog/i6300esb.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ static unsigned short triggered; /* The status of the watchdog upon boot */
static char esb_expect_close;
static struct platform_device *esb_platform_device;


/* module parameters */
/* 30 sec default heartbeat (1 < heartbeat < 2*1023) */
#define WATCHDOG_HEARTBEAT 30
Expand Down Expand Up @@ -116,13 +115,18 @@ static inline void esb_unlock_registers(void)
writeb(ESB_UNLOCK2, ESB_RELOAD_REG);
}

static void esb_timer_start(void)
static int esb_timer_start(void)
{
u8 val;

spin_lock(&esb_lock);
esb_unlock_registers();
writew(ESB_WDT_RELOAD, ESB_RELOAD_REG);
/* Enable or Enable + Lock? */
val = 0x02 | (nowayout ? 0x01 : 0x00);
pci_write_config_byte(esb_pci, ESB_LOCK_REG, val);
spin_unlock(&esb_lock);
return 0;
}

static int esb_timer_stop(void)
Expand Down Expand Up @@ -209,7 +213,6 @@ static int esb_open(struct inode *inode, struct file *file)
return -EBUSY;

/* Reload and activate timer */
esb_timer_keepalive();
esb_timer_start();

return nonseekable_open(inode, file);
Expand Down Expand Up @@ -295,7 +298,6 @@ static long esb_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
}

if (new_options & WDIOS_ENABLECARD) {
esb_timer_keepalive();
esb_timer_start();
retval = 0;
}
Expand Down

0 comments on commit 6c5a4d5

Please sign in to comment.