aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/ep93xx_wdt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/watchdog/ep93xx_wdt.c')
-rw-r--r--drivers/watchdog/ep93xx_wdt.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/watchdog/ep93xx_wdt.c b/drivers/watchdog/ep93xx_wdt.c
index 0e4787a0bb87..e9f950ff86ea 100644
--- a/drivers/watchdog/ep93xx_wdt.c
+++ b/drivers/watchdog/ep93xx_wdt.c
@@ -28,9 +28,8 @@
28#include <linux/miscdevice.h> 28#include <linux/miscdevice.h>
29#include <linux/watchdog.h> 29#include <linux/watchdog.h>
30#include <linux/timer.h> 30#include <linux/timer.h>
31 31#include <linux/uaccess.h>
32#include <asm/hardware.h> 32#include <mach/hardware.h>
33#include <asm/uaccess.h>
34 33
35#define WDT_VERSION "0.3" 34#define WDT_VERSION "0.3"
36#define PFX "ep93xx_wdt: " 35#define PFX "ep93xx_wdt: "
@@ -136,9 +135,8 @@ static struct watchdog_info ident = {
136 .identity = "EP93xx Watchdog", 135 .identity = "EP93xx Watchdog",
137}; 136};
138 137
139static int 138static long ep93xx_wdt_ioctl(struct file *file,
140ep93xx_wdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd, 139 unsigned int cmd, unsigned long arg)
141 unsigned long arg)
142{ 140{
143 int ret = -ENOTTY; 141 int ret = -ENOTTY;
144 142
@@ -156,15 +154,15 @@ ep93xx_wdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
156 ret = put_user(boot_status, (int __user *)arg); 154 ret = put_user(boot_status, (int __user *)arg);
157 break; 155 break;
158 156
159 case WDIOC_GETTIMEOUT:
160 /* actually, it is 0.250 seconds.... */
161 ret = put_user(1, (int __user *)arg);
162 break;
163
164 case WDIOC_KEEPALIVE: 157 case WDIOC_KEEPALIVE:
165 wdt_keepalive(); 158 wdt_keepalive();
166 ret = 0; 159 ret = 0;
167 break; 160 break;
161
162 case WDIOC_GETTIMEOUT:
163 /* actually, it is 0.250 seconds.... */
164 ret = put_user(1, (int __user *)arg);
165 break;
168 } 166 }
169 return ret; 167 return ret;
170} 168}
@@ -174,8 +172,8 @@ static int ep93xx_wdt_release(struct inode *inode, struct file *file)
174 if (test_bit(WDT_OK_TO_CLOSE, &wdt_status)) 172 if (test_bit(WDT_OK_TO_CLOSE, &wdt_status))
175 wdt_shutdown(); 173 wdt_shutdown();
176 else 174 else
177 printk(KERN_CRIT PFX "Device closed unexpectedly - " 175 printk(KERN_CRIT PFX
178 "timer will not stop\n"); 176 "Device closed unexpectedly - timer will not stop\n");
179 177
180 clear_bit(WDT_IN_USE, &wdt_status); 178 clear_bit(WDT_IN_USE, &wdt_status);
181 clear_bit(WDT_OK_TO_CLOSE, &wdt_status); 179 clear_bit(WDT_OK_TO_CLOSE, &wdt_status);
@@ -186,7 +184,7 @@ static int ep93xx_wdt_release(struct inode *inode, struct file *file)
186static const struct file_operations ep93xx_wdt_fops = { 184static const struct file_operations ep93xx_wdt_fops = {
187 .owner = THIS_MODULE, 185 .owner = THIS_MODULE,
188 .write = ep93xx_wdt_write, 186 .write = ep93xx_wdt_write,
189 .ioctl = ep93xx_wdt_ioctl, 187 .unlocked_ioctl = ep93xx_wdt_ioctl,
190 .open = ep93xx_wdt_open, 188 .open = ep93xx_wdt_open,
191 .release = ep93xx_wdt_release, 189 .release = ep93xx_wdt_release,
192}; 190};
@@ -243,7 +241,9 @@ module_param(nowayout, int, 0);
243MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started"); 241MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started");
244 242
245module_param(timeout, int, 0); 243module_param(timeout, int, 0);
246MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds. (1<=timeout<=3600, default=" __MODULE_STRING(WATCHDOG_TIMEOUT) ")"); 244MODULE_PARM_DESC(timeout,
245 "Watchdog timeout in seconds. (1<=timeout<=3600, default="
246 __MODULE_STRING(WATCHDOG_TIMEOUT) ")");
247 247
248MODULE_AUTHOR("Ray Lehtiniemi <rayl@mail.com>," 248MODULE_AUTHOR("Ray Lehtiniemi <rayl@mail.com>,"
249 "Alessandro Zummo <a.zummo@towertech.it>"); 249 "Alessandro Zummo <a.zummo@towertech.it>");