From: Alan Cox Signed-off-by: Alan Cox Signed-off-by: Andrew Morton --- drivers/watchdog/pnx4008_wdt.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff -puN drivers/watchdog/pnx4008_wdt.c~watchdog-pnx4008_wdt-unlocked_ioctl-setup drivers/watchdog/pnx4008_wdt.c --- a/drivers/watchdog/pnx4008_wdt.c~watchdog-pnx4008_wdt-unlocked_ioctl-setup +++ a/drivers/watchdog/pnx4008_wdt.c @@ -30,8 +30,8 @@ #include #include -#include -#include +#include +#include #define MODULE_NAME "PNX4008-WDT: " @@ -144,9 +144,8 @@ static int pnx4008_wdt_open(struct inode 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, con 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 pnx4 .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, }; _