diff options
-rw-r--r-- | drivers/watchdog/cpwd.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/watchdog/cpwd.c b/drivers/watchdog/cpwd.c index 9393be584e72..808eeb4779e4 100644 --- a/drivers/watchdog/cpwd.c +++ b/drivers/watchdog/cpwd.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/interrupt.h> | 26 | #include <linux/interrupt.h> |
27 | #include <linux/ioport.h> | 27 | #include <linux/ioport.h> |
28 | #include <linux/timer.h> | 28 | #include <linux/timer.h> |
29 | #include <linux/compat.h> | ||
29 | #include <linux/slab.h> | 30 | #include <linux/slab.h> |
30 | #include <linux/mutex.h> | 31 | #include <linux/mutex.h> |
31 | #include <linux/io.h> | 32 | #include <linux/io.h> |
@@ -473,6 +474,11 @@ static long cpwd_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |||
473 | return 0; | 474 | return 0; |
474 | } | 475 | } |
475 | 476 | ||
477 | static long cpwd_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | ||
478 | { | ||
479 | return cpwd_ioctl(file, cmd, (unsigned long)compat_ptr(arg)); | ||
480 | } | ||
481 | |||
476 | static ssize_t cpwd_write(struct file *file, const char __user *buf, | 482 | static ssize_t cpwd_write(struct file *file, const char __user *buf, |
477 | size_t count, loff_t *ppos) | 483 | size_t count, loff_t *ppos) |
478 | { | 484 | { |
@@ -497,7 +503,7 @@ static ssize_t cpwd_read(struct file *file, char __user *buffer, | |||
497 | static const struct file_operations cpwd_fops = { | 503 | static const struct file_operations cpwd_fops = { |
498 | .owner = THIS_MODULE, | 504 | .owner = THIS_MODULE, |
499 | .unlocked_ioctl = cpwd_ioctl, | 505 | .unlocked_ioctl = cpwd_ioctl, |
500 | .compat_ioctl = compat_ptr_ioctl, | 506 | .compat_ioctl = cpwd_compat_ioctl, |
501 | .open = cpwd_open, | 507 | .open = cpwd_open, |
502 | .write = cpwd_write, | 508 | .write = cpwd_write, |
503 | .read = cpwd_read, | 509 | .read = cpwd_read, |