From b240952bb80f2b45a67b22537ea0ada362c42168 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 19 May 2008 14:08:16 +0100 Subject: [PATCH] --- yaml --- r: 107834 b: refs/heads/master c: 619a8a2bb1d0c3f8270da4496a30f1e83e6eab5e h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/watchdog/sbc7240_wdt.c | 16 +++++++--------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/[refs] b/[refs] index 38aea1753510..3e7a5ceab116 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1780de41406d783aa57459ba636a09aeda21d180 +refs/heads/master: 619a8a2bb1d0c3f8270da4496a30f1e83e6eab5e diff --git a/trunk/drivers/watchdog/sbc7240_wdt.c b/trunk/drivers/watchdog/sbc7240_wdt.c index 4c8cefbd8627..abccbe265249 100644 --- a/trunk/drivers/watchdog/sbc7240_wdt.c +++ b/trunk/drivers/watchdog/sbc7240_wdt.c @@ -27,10 +27,10 @@ #include #include #include +#include +#include #include -#include #include -#include #define SBC7240_PREFIX "sbc7240_wdt: " @@ -159,7 +159,7 @@ static int fop_close(struct inode *inode, struct file *file) return 0; } -static struct watchdog_info ident = { +static const struct watchdog_info ident = { .options = WDIOF_KEEPALIVEPING| WDIOF_SETTIMEOUT| WDIOF_MAGICCLOSE, @@ -168,14 +168,12 @@ static struct watchdog_info ident = { }; -static int fop_ioctl(struct inode *inode, struct file *file, unsigned int cmd, - unsigned long arg) +static long fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { switch (cmd) { case WDIOC_GETSUPPORT: - return copy_to_user - ((void __user *)arg, &ident, sizeof(ident)) - ? -EFAULT : 0; + return copy_to_user((void __user *)arg, &ident, sizeof(ident)) + ? -EFAULT : 0; case WDIOC_GETSTATUS: case WDIOC_GETBOOTSTATUS: return put_user(0, (int __user *)arg); @@ -225,7 +223,7 @@ static const struct file_operations wdt_fops = { .write = fop_write, .open = fop_open, .release = fop_close, - .ioctl = fop_ioctl, + .unlocked_ioctl = fop_ioctl, }; static struct miscdevice wdt_miscdev = {