diff options
author | Alan Cox <alan@redhat.com> | 2008-05-19 14:07:09 +0100 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2008-06-13 19:44:39 +0000 |
commit | f26ef3dc69467e135e2b9555e44a088aee5c7d8f (patch) | |
tree | 629c9d74f539875d5f18e8d0536199dfd7a25ebc /drivers/watchdog/mpc83xx_wdt.c | |
parent | 3930964532f8e454910cbe0d9909e98a02d9f552 (diff) | |
download | lwn-f26ef3dc69467e135e2b9555e44a088aee5c7d8f.tar.gz lwn-f26ef3dc69467e135e2b9555e44a088aee5c7d8f.zip |
[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>
Diffstat (limited to 'drivers/watchdog/mpc83xx_wdt.c')
-rw-r--r-- | drivers/watchdog/mpc83xx_wdt.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/watchdog/mpc83xx_wdt.c b/drivers/watchdog/mpc83xx_wdt.c index b16c5cd972eb..109eea0df2d0 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 struct mpc83xx_wdt __iomem *wd_base; 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 @@ static int mpc83xx_wdt_release(struct inode *inode, struct file *file) 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 @@ static const struct file_operations mpc83xx_wdt_fops = { .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 @@ static int __devinit mpc83xx_wdt_probe(struct platform_device *dev) 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; |