Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 209320
b: refs/heads/master
c: aae67f3
h: refs/heads/master
v: v3
  • Loading branch information
dann frazier authored and Wim Van Sebroeck committed Aug 13, 2010
1 parent 1890a37 commit 1f86884
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6f681c2eabbd8df062963c52abaa0c7c3b2c5a7d
refs/heads/master: aae67f3602d8869c8ab1b34b6ba9206e9fff4b16
9 changes: 9 additions & 0 deletions trunk/drivers/watchdog/hpwdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,11 @@ static int hpwdt_change_timer(int new_margin)
return 0;
}

static int hpwdt_time_left(void)
{
return TICKS_TO_SECS(ioread16(hpwdt_timer_reg));
}

/*
* NMI Handler
*/
Expand Down Expand Up @@ -591,6 +596,10 @@ static long hpwdt_ioctl(struct file *file, unsigned int cmd,
case WDIOC_GETTIMEOUT:
ret = put_user(soft_margin, p);
break;

case WDIOC_GETTIMELEFT:
ret = put_user(hpwdt_time_left(), p);
break;
}
return ret;
}
Expand Down

0 comments on commit 1f86884

Please sign in to comment.