mirror of
https://github.com/torvalds/linux.git
synced 2024-12-05 10:32:35 +00:00
[WATCHDOG 33/57] pnx4008_wdt: unlocked_ioctl setup
Review and switch to unlocked_ioctl Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
This commit is contained in:
parent
261dcc70aa
commit
84ca995c25
@ -30,8 +30,8 @@
|
|||||||
#include <linux/spinlock.h>
|
#include <linux/spinlock.h>
|
||||||
|
|
||||||
#include <asm/hardware.h>
|
#include <asm/hardware.h>
|
||||||
#include <asm/uaccess.h>
|
#include <linux/uaccess.h>
|
||||||
#include <asm/io.h>
|
#include <linux/io.h>
|
||||||
|
|
||||||
#define MODULE_NAME "PNX4008-WDT: "
|
#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);
|
return nonseekable_open(inode, file);
|
||||||
}
|
}
|
||||||
|
|
||||||
static ssize_t
|
static ssize_t pnx4008_wdt_write(struct file *file, const char *data,
|
||||||
pnx4008_wdt_write(struct file *file, const char *data, size_t len,
|
size_t len, loff_t *ppos)
|
||||||
loff_t * ppos)
|
|
||||||
{
|
{
|
||||||
if (len) {
|
if (len) {
|
||||||
if (!nowayout) {
|
if (!nowayout) {
|
||||||
@ -169,15 +168,14 @@ pnx4008_wdt_write(struct file *file, const char *data, size_t len,
|
|||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct watchdog_info ident = {
|
static const struct watchdog_info ident = {
|
||||||
.options = WDIOF_CARDRESET | WDIOF_MAGICCLOSE |
|
.options = WDIOF_CARDRESET | WDIOF_MAGICCLOSE |
|
||||||
WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING,
|
WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING,
|
||||||
.identity = "PNX4008 Watchdog",
|
.identity = "PNX4008 Watchdog",
|
||||||
};
|
};
|
||||||
|
|
||||||
static int
|
static long pnx4008_wdt_ioctl(struct inode *inode, struct file *file,
|
||||||
pnx4008_wdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
|
unsigned int cmd, unsigned long arg)
|
||||||
unsigned long arg)
|
|
||||||
{
|
{
|
||||||
int ret = -ENOTTY;
|
int ret = -ENOTTY;
|
||||||
int time;
|
int time;
|
||||||
@ -238,7 +236,7 @@ static const struct file_operations pnx4008_wdt_fops = {
|
|||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.write = pnx4008_wdt_write,
|
.write = pnx4008_wdt_write,
|
||||||
.ioctl = pnx4008_wdt_ioctl,
|
.unlocked_ioctl = pnx4008_wdt_ioctl,
|
||||||
.open = pnx4008_wdt_open,
|
.open = pnx4008_wdt_open,
|
||||||
.release = pnx4008_wdt_release,
|
.release = pnx4008_wdt_release,
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user