aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Cox <alan@redhat.com>2008-05-19 09:07:48 -0400
committerWim Van Sebroeck <wim@iguana.be>2008-06-21 08:19:03 -0400
commit84ca995c258df70a8914866e8c996845003ff938 (patch)
treeb3edde69f9d560ca62a9a54f1e40a69ba24f3f0d
parent261dcc70aae926ba7b9218da7302f0ad2f665b79 (diff)
[WATCHDOG 33/57] pnx4008_wdt: unlocked_ioctl setup
Review and switch to unlocked_ioctl Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
-rw-r--r--drivers/watchdog/pnx4008_wdt.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/watchdog/pnx4008_wdt.c b/drivers/watchdog/pnx4008_wdt.c
index 6b8483d3c783..8cd0d53941e7 100644
--- a/drivers/watchdog/pnx4008_wdt.c
+++ b/drivers/watchdog/pnx4008_wdt.c
@@ -30,8 +30,8 @@
30#include <linux/spinlock.h> 30#include <linux/spinlock.h>
31 31
32#include <asm/hardware.h> 32#include <asm/hardware.h>
33#include <asm/uaccess.h> 33#include <linux/uaccess.h>
34#include <asm/io.h> 34#include <linux/io.h>
35 35
36#define MODULE_NAME "PNX4008-WDT: " 36#define MODULE_NAME "PNX4008-WDT: "
37 37
@@ -144,9 +144,8 @@ static int pnx4008_wdt_open(struct inode *inode, struct file *file)
144 return nonseekable_open(inode, file); 144 return nonseekable_open(inode, file);
145} 145}
146 146
147static ssize_t 147static ssize_t pnx4008_wdt_write(struct file *file, const char *data,
148pnx4008_wdt_write(struct file *file, const char *data, size_t len, 148 size_t len, loff_t *ppos)
149 loff_t * ppos)
150{ 149{
151 if (len) { 150 if (len) {
152 if (!nowayout) { 151 if (!nowayout) {
@@ -169,15 +168,14 @@ pnx4008_wdt_write(struct file *file, const char *data, size_t len,
169 return len; 168 return len;
170} 169}
171 170
172static struct watchdog_info ident = { 171static const struct watchdog_info ident = {
173 .options = WDIOF_CARDRESET | WDIOF_MAGICCLOSE | 172 .options = WDIOF_CARDRESET | WDIOF_MAGICCLOSE |
174 WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING, 173 WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING,
175 .identity = "PNX4008 Watchdog", 174 .identity = "PNX4008 Watchdog",
176}; 175};
177 176
178static int 177static long pnx4008_wdt_ioctl(struct inode *inode, struct file *file,
179pnx4008_wdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd, 178 unsigned int cmd, unsigned long arg)
180 unsigned long arg)
181{ 179{
182 int ret = -ENOTTY; 180 int ret = -ENOTTY;
183 int time; 181 int time;
@@ -238,7 +236,7 @@ static const struct file_operations pnx4008_wdt_fops = {
238 .owner = THIS_MODULE, 236 .owner = THIS_MODULE,
239 .llseek = no_llseek, 237 .llseek = no_llseek,
240 .write = pnx4008_wdt_write, 238 .write = pnx4008_wdt_write,
241 .ioctl = pnx4008_wdt_ioctl, 239 .unlocked_ioctl = pnx4008_wdt_ioctl,
242 .open = pnx4008_wdt_open, 240 .open = pnx4008_wdt_open,
243 .release = pnx4008_wdt_release, 241 .release = pnx4008_wdt_release,
244}; 242};