aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/sa1100_wdt.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-08-10 00:29:47 -0400
committerDavid S. Miller <davem@davemloft.net>2009-08-10 00:29:47 -0400
commitf222e8b40f2177b1c4cac015b117744c1d3fa3e9 (patch)
tree7c5fc22c08da900e21b0e7ab2376e8e8e44a63c0 /drivers/watchdog/sa1100_wdt.c
parent819ae6a389d4acfab9a7bb874fa1977aa464d14b (diff)
parentf4b9a988685da6386d7f9a72df3098bcc3270526 (diff)
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Diffstat (limited to 'drivers/watchdog/sa1100_wdt.c')
-rw-r--r--drivers/watchdog/sa1100_wdt.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/watchdog/sa1100_wdt.c b/drivers/watchdog/sa1100_wdt.c
index ee1caae4d33..016245419fa 100644
--- a/drivers/watchdog/sa1100_wdt.c
+++ b/drivers/watchdog/sa1100_wdt.c
@@ -38,7 +38,7 @@
38 38
39static unsigned long oscr_freq; 39static unsigned long oscr_freq;
40static unsigned long sa1100wdt_users; 40static unsigned long sa1100wdt_users;
41static int pre_margin; 41static unsigned int pre_margin;
42static int boot_status; 42static int boot_status;
43 43
44/* 44/*
@@ -84,6 +84,7 @@ static const struct watchdog_info ident = {
84 .options = WDIOF_CARDRESET | WDIOF_SETTIMEOUT 84 .options = WDIOF_CARDRESET | WDIOF_SETTIMEOUT
85 | WDIOF_KEEPALIVEPING, 85 | WDIOF_KEEPALIVEPING,
86 .identity = "SA1100/PXA255 Watchdog", 86 .identity = "SA1100/PXA255 Watchdog",
87 .firmware_version = 1,
87}; 88};
88 89
89static long sa1100dog_ioctl(struct file *file, unsigned int cmd, 90static long sa1100dog_ioctl(struct file *file, unsigned int cmd,
@@ -118,7 +119,7 @@ static long sa1100dog_ioctl(struct file *file, unsigned int cmd,
118 if (ret) 119 if (ret)
119 break; 120 break;
120 121
121 if (time <= 0 || time > 255) { 122 if (time <= 0 || (oscr_freq * (long long)time >= 0xffffffff)) {
122 ret = -EINVAL; 123 ret = -EINVAL;
123 break; 124 break;
124 } 125 }