Commit f339e2ac authored by Alan Cox's avatar Alan Cox Committed by Wim Van Sebroeck

[WATCHDOG 09/57] ep93xx_wdt: unlocked_ioctl

Review and switch to unlocked_ioctl
Signed-off-by: default avatarAlan Cox <alan@redhat.com>
Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
parent f78b0a8f
...@@ -28,9 +28,9 @@ ...@@ -28,9 +28,9 @@
#include <linux/miscdevice.h> #include <linux/miscdevice.h>
#include <linux/watchdog.h> #include <linux/watchdog.h>
#include <linux/timer.h> #include <linux/timer.h>
#include <linux/uaccess.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/uaccess.h>
#define WDT_VERSION "0.3" #define WDT_VERSION "0.3"
#define PFX "ep93xx_wdt: " #define PFX "ep93xx_wdt: "
...@@ -136,9 +136,8 @@ static struct watchdog_info ident = { ...@@ -136,9 +136,8 @@ static struct watchdog_info ident = {
.identity = "EP93xx Watchdog", .identity = "EP93xx Watchdog",
}; };
static int static long ep93xx_wdt_ioctl(struct file *file,
ep93xx_wdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned int cmd, unsigned long arg)
unsigned long arg)
{ {
int ret = -ENOTTY; int ret = -ENOTTY;
...@@ -174,8 +173,8 @@ static int ep93xx_wdt_release(struct inode *inode, struct file *file) ...@@ -174,8 +173,8 @@ static int ep93xx_wdt_release(struct inode *inode, struct file *file)
if (test_bit(WDT_OK_TO_CLOSE, &wdt_status)) if (test_bit(WDT_OK_TO_CLOSE, &wdt_status))
wdt_shutdown(); wdt_shutdown();
else else
printk(KERN_CRIT PFX "Device closed unexpectedly - " printk(KERN_CRIT PFX
"timer will not stop\n"); "Device closed unexpectedly - timer will not stop\n");
clear_bit(WDT_IN_USE, &wdt_status); clear_bit(WDT_IN_USE, &wdt_status);
clear_bit(WDT_OK_TO_CLOSE, &wdt_status); clear_bit(WDT_OK_TO_CLOSE, &wdt_status);
...@@ -186,7 +185,7 @@ static int ep93xx_wdt_release(struct inode *inode, struct file *file) ...@@ -186,7 +185,7 @@ static int ep93xx_wdt_release(struct inode *inode, struct file *file)
static const struct file_operations ep93xx_wdt_fops = { static const struct file_operations ep93xx_wdt_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.write = ep93xx_wdt_write, .write = ep93xx_wdt_write,
.ioctl = ep93xx_wdt_ioctl, .unlocked_ioctl = ep93xx_wdt_ioctl,
.open = ep93xx_wdt_open, .open = ep93xx_wdt_open,
.release = ep93xx_wdt_release, .release = ep93xx_wdt_release,
}; };
...@@ -243,7 +242,9 @@ module_param(nowayout, int, 0); ...@@ -243,7 +242,9 @@ module_param(nowayout, int, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started"); MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started");
module_param(timeout, int, 0); module_param(timeout, int, 0);
MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds. (1<=timeout<=3600, default=" __MODULE_STRING(WATCHDOG_TIMEOUT) ")"); MODULE_PARM_DESC(timeout,
"Watchdog timeout in seconds. (1<=timeout<=3600, default="
__MODULE_STRING(WATCHDOG_TIMEOUT) ")");
MODULE_AUTHOR("Ray Lehtiniemi <rayl@mail.com>," MODULE_AUTHOR("Ray Lehtiniemi <rayl@mail.com>,"
"Alessandro Zummo <a.zummo@towertech.it>"); "Alessandro Zummo <a.zummo@towertech.it>");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment