aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/sbus/char/cpwatchdog.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/sbus/char/cpwatchdog.c')
-rw-r--r--drivers/sbus/char/cpwatchdog.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/sbus/char/cpwatchdog.c b/drivers/sbus/char/cpwatchdog.c
index c82abeb59d3a..071ae24be892 100644
--- a/drivers/sbus/char/cpwatchdog.c
+++ b/drivers/sbus/char/cpwatchdog.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/smp_lock.h>
29#include <asm/irq.h> 30#include <asm/irq.h>
30#include <asm/ebus.h> 31#include <asm/ebus.h>
31#include <asm/oplib.h> 32#include <asm/oplib.h>
@@ -394,6 +395,28 @@ static int wd_ioctl(struct inode *inode, struct file *file,
394 return(0); 395 return(0);
395} 396}
396 397
398static long wd_compat_ioctl(struct file *file, unsigned int cmd,
399 unsigned long arg)
400{
401 int rval = -ENOIOCTLCMD;
402
403 switch (cmd) {
404 /* solaris ioctls are specific to this driver */
405 case WIOCSTART:
406 case WIOCSTOP:
407 case WIOCGSTAT:
408 lock_kernel();
409 rval = wd_ioctl(file->f_dentry->d_inode, file, cmd, arg);
410 lock_kernel();
411 break;
412 /* everything else is handled by the generic compat layer */
413 default:
414 break;
415 }
416
417 return rval;
418}
419
397static ssize_t wd_write(struct file *file, 420static ssize_t wd_write(struct file *file,
398 const char __user *buf, 421 const char __user *buf,
399 size_t count, 422 size_t count,
@@ -441,6 +464,7 @@ static irqreturn_t wd_interrupt(int irq, void *dev_id, struct pt_regs *regs)
441static struct file_operations wd_fops = { 464static struct file_operations wd_fops = {
442 .owner = THIS_MODULE, 465 .owner = THIS_MODULE,
443 .ioctl = wd_ioctl, 466 .ioctl = wd_ioctl,
467 .compat_ioctl = wd_compat_ioctl,
444 .open = wd_open, 468 .open = wd_open,
445 .write = wd_write, 469 .write = wd_write,
446 .read = wd_read, 470 .read = wd_read,