aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/sbus/char/openprom.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/sbus/char/openprom.c')
-rw-r--r--drivers/sbus/char/openprom.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/drivers/sbus/char/openprom.c b/drivers/sbus/char/openprom.c
index 58ed33749571..5028ac214326 100644
--- a/drivers/sbus/char/openprom.c
+++ b/drivers/sbus/char/openprom.c
@@ -39,6 +39,7 @@
39#include <linux/slab.h> 39#include <linux/slab.h>
40#include <linux/string.h> 40#include <linux/string.h>
41#include <linux/miscdevice.h> 41#include <linux/miscdevice.h>
42#include <linux/smp_lock.h>
42#include <linux/init.h> 43#include <linux/init.h>
43#include <linux/fs.h> 44#include <linux/fs.h>
44#include <asm/oplib.h> 45#include <asm/oplib.h>
@@ -565,6 +566,38 @@ static int openprom_ioctl(struct inode * inode, struct file * file,
565 } 566 }
566} 567}
567 568
569static long openprom_compat_ioctl(struct file *file, unsigned int cmd,
570 unsigned long arg)
571{
572 long rval = -ENOTTY;
573
574 /*
575 * SunOS/Solaris only, the NetBSD one's have embedded pointers in
576 * the arg which we'd need to clean up...
577 */
578 switch (cmd) {
579 case OPROMGETOPT:
580 case OPROMSETOPT:
581 case OPROMNXTOPT:
582 case OPROMSETOPT2:
583 case OPROMNEXT:
584 case OPROMCHILD:
585 case OPROMGETPROP:
586 case OPROMNXTPROP:
587 case OPROMU2P:
588 case OPROMGETCONS:
589 case OPROMGETFBNAME:
590 case OPROMGETBOOTARGS:
591 case OPROMSETCUR:
592 case OPROMPCI2NODE:
593 case OPROMPATH2NODE:
594 lock_kernel();
595 rval = openprom_ioctl(file->f_dentry->d_inode, file, cmd, arg);
596 lock_kernel();
597 break;
598 }
599}
600
568static int openprom_open(struct inode * inode, struct file * file) 601static int openprom_open(struct inode * inode, struct file * file)
569{ 602{
570 DATA *data; 603 DATA *data;