diff options
author | Wim Van Sebroeck <wim@iguana.be> | 2009-01-21 06:13:11 -0500 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2009-03-25 04:54:57 -0400 |
commit | 9626dd75c57360666f4cdcb660c1672ee9f952e8 (patch) | |
tree | 1d746ff1304b7751b9229faa73c9151381f07421 /drivers/watchdog | |
parent | 8e0ee43bc2c3e19db56a4adaa9a9b04ce885cd84 (diff) |
[WATCHDOG] cpwd.c & riowd.c - unlocked_ioctl
Switch to unlocked_ioctl
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog')
-rw-r--r-- | drivers/watchdog/cpwd.c | 20 | ||||
-rw-r--r-- | drivers/watchdog/riowd.c | 15 |
2 files changed, 17 insertions, 18 deletions
diff --git a/drivers/watchdog/cpwd.c b/drivers/watchdog/cpwd.c index 084dfe9cecfb..261790afd65b 100644 --- a/drivers/watchdog/cpwd.c +++ b/drivers/watchdog/cpwd.c | |||
@@ -400,8 +400,7 @@ static int cpwd_release(struct inode *inode, struct file *file) | |||
400 | return 0; | 400 | return 0; |
401 | } | 401 | } |
402 | 402 | ||
403 | static int cpwd_ioctl(struct inode *inode, struct file *file, | 403 | static long cpwd_ioctl(struct file *file, unsigned int cmd, unsigned long arg) |
404 | unsigned int cmd, unsigned long arg) | ||
405 | { | 404 | { |
406 | static struct watchdog_info info = { | 405 | static struct watchdog_info info = { |
407 | .options = WDIOF_SETTIMEOUT, | 406 | .options = WDIOF_SETTIMEOUT, |
@@ -409,6 +408,7 @@ static int cpwd_ioctl(struct inode *inode, struct file *file, | |||
409 | .identity = DRIVER_NAME, | 408 | .identity = DRIVER_NAME, |
410 | }; | 409 | }; |
411 | void __user *argp = (void __user *)arg; | 410 | void __user *argp = (void __user *)arg; |
411 | struct inode *inode = file->f_path.dentry->d_inode; | ||
412 | int index = iminor(inode) - WD0_MINOR; | 412 | int index = iminor(inode) - WD0_MINOR; |
413 | struct cpwd *p = cpwd_device; | 413 | struct cpwd *p = cpwd_device; |
414 | int setopt = 0; | 414 | int setopt = 0; |
@@ -481,7 +481,7 @@ static long cpwd_compat_ioctl(struct file *file, unsigned int cmd, | |||
481 | case WIOCSTOP: | 481 | case WIOCSTOP: |
482 | case WIOCGSTAT: | 482 | case WIOCGSTAT: |
483 | lock_kernel(); | 483 | lock_kernel(); |
484 | rval = cpwd_ioctl(file->f_path.dentry->d_inode, file, cmd, arg); | 484 | rval = cpwd_ioctl(file, cmd, arg); |
485 | unlock_kernel(); | 485 | unlock_kernel(); |
486 | break; | 486 | break; |
487 | 487 | ||
@@ -515,13 +515,13 @@ static ssize_t cpwd_read(struct file * file, char __user *buffer, | |||
515 | } | 515 | } |
516 | 516 | ||
517 | static const struct file_operations cpwd_fops = { | 517 | static const struct file_operations cpwd_fops = { |
518 | .owner = THIS_MODULE, | 518 | .owner = THIS_MODULE, |
519 | .ioctl = cpwd_ioctl, | 519 | .unlocked_ioctl = cpwd_ioctl, |
520 | .compat_ioctl = cpwd_compat_ioctl, | 520 | .compat_ioctl = cpwd_compat_ioctl, |
521 | .open = cpwd_open, | 521 | .open = cpwd_open, |
522 | .write = cpwd_write, | 522 | .write = cpwd_write, |
523 | .read = cpwd_read, | 523 | .read = cpwd_read, |
524 | .release = cpwd_release, | 524 | .release = cpwd_release, |
525 | }; | 525 | }; |
526 | 526 | ||
527 | static int __devinit cpwd_probe(struct of_device *op, | 527 | static int __devinit cpwd_probe(struct of_device *op, |
diff --git a/drivers/watchdog/riowd.c b/drivers/watchdog/riowd.c index 09cb1833ea27..01cc7e39d92f 100644 --- a/drivers/watchdog/riowd.c +++ b/drivers/watchdog/riowd.c | |||
@@ -86,8 +86,7 @@ static int riowd_release(struct inode *inode, struct file *filp) | |||
86 | return 0; | 86 | return 0; |
87 | } | 87 | } |
88 | 88 | ||
89 | static int riowd_ioctl(struct inode *inode, struct file *filp, | 89 | static long riowd_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) |
90 | unsigned int cmd, unsigned long arg) | ||
91 | { | 90 | { |
92 | static struct watchdog_info info = { | 91 | static struct watchdog_info info = { |
93 | .options = WDIOF_SETTIMEOUT, | 92 | .options = WDIOF_SETTIMEOUT, |
@@ -160,12 +159,12 @@ static ssize_t riowd_write(struct file *file, const char __user *buf, size_t cou | |||
160 | } | 159 | } |
161 | 160 | ||
162 | static const struct file_operations riowd_fops = { | 161 | static const struct file_operations riowd_fops = { |
163 | .owner = THIS_MODULE, | 162 | .owner = THIS_MODULE, |
164 | .llseek = no_llseek, | 163 | .llseek = no_llseek, |
165 | .ioctl = riowd_ioctl, | 164 | .unlocked_ioctl = riowd_ioctl, |
166 | .open = riowd_open, | 165 | .open = riowd_open, |
167 | .write = riowd_write, | 166 | .write = riowd_write, |
168 | .release = riowd_release, | 167 | .release = riowd_release, |
169 | }; | 168 | }; |
170 | 169 | ||
171 | static struct miscdevice riowd_miscdev = { | 170 | static struct miscdevice riowd_miscdev = { |