[PATCH 33/57] pnx4008_wdt: unlocked_ioctl setup

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Alan Cox
Date: Monday, May 19, 2008 - 6:07 am

From: Alan Cox <alan@redhat.com>


---

 drivers/watchdog/pnx4008_wdt.c |   18 ++++++++----------
 1 files changed, 8 insertions(+), 10 deletions(-)


diff --git a/drivers/watchdog/pnx4008_wdt.c b/drivers/watchdog/pnx4008_wdt.c
index 6b8483d..8cd0d53 100644
--- a/drivers/watchdog/pnx4008_wdt.c
+++ b/drivers/watchdog/pnx4008_wdt.c
@@ -30,8 +30,8 @@
 #include <linux/spinlock.h>
 
 #include <asm/hardware.h>
-#include <asm/uaccess.h>
-#include <asm/io.h>
+#include <linux/uaccess.h>
+#include <linux/io.h>
 
 #define MODULE_NAME "PNX4008-WDT: "
 
@@ -144,9 +144,8 @@ static int pnx4008_wdt_open(struct inode *inode, struct file *file)
 	return nonseekable_open(inode, file);
 }
 
-static ssize_t
-pnx4008_wdt_write(struct file *file, const char *data, size_t len,
-		  loff_t * ppos)
+static ssize_t pnx4008_wdt_write(struct file *file, const char *data,
+					size_t len, loff_t *ppos)
 {
 	if (len) {
 		if (!nowayout) {
@@ -169,15 +168,14 @@ pnx4008_wdt_write(struct file *file, const char *data, size_t len,
 	return len;
 }
 
-static struct watchdog_info ident = {
+static const struct watchdog_info ident = {
 	.options = WDIOF_CARDRESET | WDIOF_MAGICCLOSE |
 	    WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING,
 	.identity = "PNX4008 Watchdog",
 };
 
-static int
-pnx4008_wdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
-		  unsigned long arg)
+static long pnx4008_wdt_ioctl(struct inode *inode, struct file *file,
+					unsigned int cmd, unsigned long arg)
 {
 	int ret = -ENOTTY;
 	int time;
@@ -238,7 +236,7 @@ static const struct file_operations pnx4008_wdt_fops = {
 	.owner = THIS_MODULE,
 	.llseek = no_llseek,
 	.write = pnx4008_wdt_write,
-	.ioctl = pnx4008_wdt_ioctl,
+	.unlocked_ioctl = pnx4008_wdt_ioctl,
 	.open = pnx4008_wdt_open,
 	.release = pnx4008_wdt_release,
 };

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 00/57] watchdog: Giant scrub, Alan Cox, (Mon May 19, 6:04 am)
[PATCH 03/57] ali: watchdog locking and style, Alan Cox, (Mon May 19, 6:04 am)
[PATCH 04/57] AR7 watchdog, Alan Cox, (Mon May 19, 6:05 am)
[PATCH 05/57] atp watchdog, Alan Cox, (Mon May 19, 6:05 am)
[PATCH 06/57] at91: watchdog to unlocked_ioctl, Alan Cox, (Mon May 19, 6:05 am)
[PATCH 07/57] cpu5_wdt: switch to unlocked_ioctl, Alan Cox, (Mon May 19, 6:05 am)
[PATCH 09/57] ep93xx_wdt: unlocked_ioctl, Alan Cox, (Mon May 19, 6:05 am)
[PATCH 11/57] hpwdt: couple of include cleanups, Alan Cox, (Mon May 19, 6:05 am)
[PATCH 15/57] indydog: Clean up and tidy, Alan Cox, (Mon May 19, 6:06 am)
[PATCH 17/57] it8712f: unlocked_ioctl, Alan Cox, (Mon May 19, 6:06 am)
[PATCH 22/57] ixp4xx_wdt: unlocked_ioctl, Alan Cox, (Mon May 19, 6:06 am)
[PATCH 26/57] mpc watchdog: clean up and locking, Alan Cox, (Mon May 19, 6:07 am)
[PATCH 33/57] pnx4008_wdt: unlocked_ioctl setup, Alan Cox, (Mon May 19, 6:07 am)
[PATCH 34/57] rm9k_wdt: clean up, Alan Cox, (Mon May 19, 6:07 am)
[PATCH 38/57] stg7240_wdt: unlocked_ioctl, Alan Cox, (Mon May 19, 6:08 am)
[PATCH 39/57] sbc8360: clean up, Alan Cox, (Mon May 19, 6:08 am)
Re: [PATCH 00/57] watchdog: Giant scrub, Andrew Morton, (Mon May 19, 11:21 am)
Re: [PATCH 00/57] watchdog: Giant scrub, Alan Cox, (Mon May 19, 12:51 pm)
Re: [PATCH 14/57] ibmasr: coding style, locking verify, Andrey Panin, (Mon May 19, 10:52 pm)
Re: [PATCH 00/57] watchdog: Giant scrub, Wim Van Sebroeck, (Tue May 20, 1:01 am)
Re: [PATCH 00/57] watchdog: Giant scrub, Andrew Morton, (Tue May 20, 1:37 am)
Re: [PATCH 00/57] watchdog: Giant scrub, Wim Van Sebroeck, (Tue May 20, 8:34 am)