aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/ep93xx_wdt.c
diff options
context:
space:
mode:
authorAlan Cox <alan@redhat.com>2008-05-19 09:05:35 -0400
committerWim Van Sebroeck <wim@iguana.be>2008-05-27 11:26:54 -0400
commitf339e2ac9d65656e6d18c92b1ddc4a7801373318 (patch)
tree1ad77eadff07c2d272b336a440af507b5b86d629 /drivers/watchdog/ep93xx_wdt.c
parentf78b0a8f27618b492dd2e1a8f5e4ce6f89b3c961 (diff)
[WATCHDOG 09/57] ep93xx_wdt: unlocked_ioctl
Review and switch to unlocked_ioctl Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog/ep93xx_wdt.c')
-rw-r--r--drivers/watchdog/ep93xx_wdt.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/watchdog/ep93xx_wdt.c b/drivers/watchdog/ep93xx_wdt.c
index 0e4787a0bb87..cdcdd11173a7 100644
--- a/drivers/watchdog/ep93xx_wdt.c
+++ b/drivers/watchdog/ep93xx_wdt.c
@@ -28,9 +28,9 @@
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#include <linux/uaccess.h>
31 32
32#include <asm/hardware.h> 33#include <asm/hardware.h>
33#include <asm/uaccess.h>
34 34
35#define WDT_VERSION "0.3" 35#define WDT_VERSION "0.3"
36#define PFX "ep93xx_wdt: " 36#define PFX "ep93xx_wdt: "
@@ -136,9 +136,8 @@ static struct watchdog_info ident = {
136 .identity = "EP93xx Watchdog", 136 .identity = "EP93xx Watchdog",
137}; 137};
138 138
139static int 139static long ep93xx_wdt_ioctl(struct file *file,
140ep93xx_wdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd, 140 unsigned int cmd, unsigned long arg)
141 unsigned long arg)
142{ 141{
143 int ret = -ENOTTY; 142 int ret = -ENOTTY;
144 143
@@ -174,8 +173,8 @@ static int ep93xx_wdt_release(struct inode *inode, struct file *file)
174 if (test_bit(WDT_OK_TO_CLOSE, &wdt_status)) 173 if (test_bit(WDT_OK_TO_CLOSE, &wdt_status))
175 wdt_shutdown(); 174 wdt_shutdown();
176 else 175 else
177 printk(KERN_CRIT PFX "Device closed unexpectedly - " 176 printk(KERN_CRIT PFX
178 "timer will not stop\n"); 177 "Device closed unexpectedly - timer will not stop\n");
179 178
180 clear_bit(WDT_IN_USE, &wdt_status); 179 clear_bit(WDT_IN_USE, &wdt_status);
181 clear_bit(WDT_OK_TO_CLOSE, &wdt_status); 180 clear_bit(WDT_OK_TO_CLOSE, &wdt_status);
@@ -186,7 +185,7 @@ static int ep93xx_wdt_release(struct inode *inode, struct file *file)
186static const struct file_operations ep93xx_wdt_fops = { 185static const struct file_operations ep93xx_wdt_fops = {
187 .owner = THIS_MODULE, 186 .owner = THIS_MODULE,
188 .write = ep93xx_wdt_write, 187 .write = ep93xx_wdt_write,
189 .ioctl = ep93xx_wdt_ioctl, 188 .unlocked_ioctl = ep93xx_wdt_ioctl,
190 .open = ep93xx_wdt_open, 189 .open = ep93xx_wdt_open,
191 .release = ep93xx_wdt_release, 190 .release = ep93xx_wdt_release,
192}; 191};
@@ -243,7 +242,9 @@ module_param(nowayout, int, 0);
243MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started"); 242MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started");
244 243
245module_param(timeout, int, 0); 244module_param(timeout, int, 0);
246MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds. (1<=timeout<=3600, default=" __MODULE_STRING(WATCHDOG_TIMEOUT) ")"); 245MODULE_PARM_DESC(timeout,
246 "Watchdog timeout in seconds. (1<=timeout<=3600, default="
247 __MODULE_STRING(WATCHDOG_TIMEOUT) ")");
247 248
248MODULE_AUTHOR("Ray Lehtiniemi <rayl@mail.com>," 249MODULE_AUTHOR("Ray Lehtiniemi <rayl@mail.com>,"
249 "Alessandro Zummo <a.zummo@towertech.it>"); 250 "Alessandro Zummo <a.zummo@towertech.it>");