[WATCHDOG 26/57] mpc watchdog: clean up and locking
Review and switch to unlocked_ioctl
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
diff --git a/drivers/watchdog/mpc83xx_wdt.c b/drivers/watchdog/mpc83xx_wdt.c
index b16c5cd..109eea0 100644
--- a/drivers/watchdog/mpc83xx_wdt.c
+++ b/drivers/watchdog/mpc83xx_wdt.c
@@ -22,8 +22,8 @@
#include <linux/platform_device.h>
#include <linux/module.h>
#include <linux/watchdog.h>
-#include <asm/io.h>
-#include <asm/uaccess.h>
+#include <linux/io.h>
+#include <linux/uaccess.h>
struct mpc83xx_wdt {
__be32 res0;
@@ -42,11 +42,13 @@
static u16 timeout = 0xffff;
module_param(timeout, ushort, 0);
-MODULE_PARM_DESC(timeout, "Watchdog timeout in ticks. (0<timeout<65536, default=65535");
+MODULE_PARM_DESC(timeout,
+ "Watchdog timeout in ticks. (0<timeout<65536, default=65535");
static int reset = 1;
module_param(reset, bool, 0);
-MODULE_PARM_DESC(reset, "Watchdog Interrupt/Reset Mode. 0 = interrupt, 1 = reset");
+MODULE_PARM_DESC(reset,
+ "Watchdog Interrupt/Reset Mode. 0 = interrupt, 1 = reset");
/*
* We always prescale, but if someone really doesn't want to they can set this
@@ -105,8 +107,8 @@
return 0;
}
-static int mpc83xx_wdt_ioctl(struct inode *inode, struct file *file,
- unsigned int cmd, unsigned long arg)
+static long mpc83xx_wdt_ioctl(struct file *file, unsigned int cmd,
+ unsigned long arg)
{
void __user *argp = (void __user *)arg;
int __user *p = argp;
@@ -136,7 +138,7 @@
.owner = THIS_MODULE,
.llseek = no_llseek,
.write = mpc83xx_wdt_write,
- .ioctl = mpc83xx_wdt_ioctl,
+ .unlocked_ioctl = mpc83xx_wdt_ioctl,
.open = mpc83xx_wdt_open,
.release = mpc83xx_wdt_release,
};
@@ -161,8 +163,7 @@
goto err_out;
}
- wd_base = ioremap(r->start, sizeof (struct mpc83xx_wdt));
-
+ wd_base = ioremap(r->start, sizeof(struct mpc83xx_wdt));
if (wd_base == NULL) {
ret = -ENOMEM;
goto err_out;