Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 209319
b: refs/heads/master
c: 6f681c2
h: refs/heads/master
i:
  209317: d128400
  209315: 9d371bb
  209311: da33a57
v: v3
  • Loading branch information
dann frazier authored and Wim Van Sebroeck committed Aug 13, 2010
1 parent 26fb52b commit 1890a37
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 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: e802e32d2b42ce1384baf4e150f444477729aad2
refs/heads/master: 6f681c2eabbd8df062963c52abaa0c7c3b2c5a7d
5 changes: 3 additions & 2 deletions trunk/drivers/watchdog/hpwdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@

#define HPWDT_VERSION "1.1.1"
#define SECS_TO_TICKS(secs) ((secs) * 1000 / 128)
#define TICKS_TO_SECS(ticks) ((ticks) * 128 / 1000)
#define HPWDT_MAX_TIMER TICKS_TO_SECS(65535)
#define DEFAULT_MARGIN 30

static unsigned int soft_margin = DEFAULT_MARGIN; /* in seconds */
Expand Down Expand Up @@ -432,8 +434,7 @@ static void hpwdt_ping(void)

static int hpwdt_change_timer(int new_margin)
{
/* Arbitrary, can't find the card's limits */
if (new_margin < 5 || new_margin > 600) {
if (new_margin < 1 || new_margin > HPWDT_MAX_TIMER) {
printk(KERN_WARNING
"hpwdt: New value passed in is invalid: %d seconds.\n",
new_margin);
Expand Down

0 comments on commit 1890a37

Please sign in to comment.