diff options
-rw-r--r-- | arch/sparc64/kernel/ioctl32.c | 18 | ||||
-rw-r--r-- | drivers/sbus/char/openprom.c | 33 |
2 files changed, 33 insertions, 18 deletions
diff --git a/arch/sparc64/kernel/ioctl32.c b/arch/sparc64/kernel/ioctl32.c index d20c8098cdf2..ec4e08c523fd 100644 --- a/arch/sparc64/kernel/ioctl32.c +++ b/arch/sparc64/kernel/ioctl32.c | |||
@@ -477,24 +477,6 @@ COMPATIBLE_IOCTL(_IOW('p', 21, int[7])) /* RTCSET */ | |||
477 | /* COMPATIBLE_IOCTL(D7SIOCRD) same value as ENVCTRL_RD_VOLTAGE_STATUS */ | 477 | /* COMPATIBLE_IOCTL(D7SIOCRD) same value as ENVCTRL_RD_VOLTAGE_STATUS */ |
478 | COMPATIBLE_IOCTL(D7SIOCWR) | 478 | COMPATIBLE_IOCTL(D7SIOCWR) |
479 | COMPATIBLE_IOCTL(D7SIOCTM) | 479 | COMPATIBLE_IOCTL(D7SIOCTM) |
480 | /* OPENPROMIO, SunOS/Solaris only, the NetBSD one's have | ||
481 | * embedded pointers in the arg which we'd need to clean up... | ||
482 | */ | ||
483 | COMPATIBLE_IOCTL(OPROMGETOPT) | ||
484 | COMPATIBLE_IOCTL(OPROMSETOPT) | ||
485 | COMPATIBLE_IOCTL(OPROMNXTOPT) | ||
486 | COMPATIBLE_IOCTL(OPROMSETOPT2) | ||
487 | COMPATIBLE_IOCTL(OPROMNEXT) | ||
488 | COMPATIBLE_IOCTL(OPROMCHILD) | ||
489 | COMPATIBLE_IOCTL(OPROMGETPROP) | ||
490 | COMPATIBLE_IOCTL(OPROMNXTPROP) | ||
491 | COMPATIBLE_IOCTL(OPROMU2P) | ||
492 | COMPATIBLE_IOCTL(OPROMGETCONS) | ||
493 | COMPATIBLE_IOCTL(OPROMGETFBNAME) | ||
494 | COMPATIBLE_IOCTL(OPROMGETBOOTARGS) | ||
495 | COMPATIBLE_IOCTL(OPROMSETCUR) | ||
496 | COMPATIBLE_IOCTL(OPROMPCI2NODE) | ||
497 | COMPATIBLE_IOCTL(OPROMPATH2NODE) | ||
498 | /* Big A */ | 480 | /* Big A */ |
499 | #if defined(CONFIG_DRM) || defined(CONFIG_DRM_MODULE) | 481 | #if defined(CONFIG_DRM) || defined(CONFIG_DRM_MODULE) |
500 | COMPATIBLE_IOCTL(DRM_IOCTL_GET_MAGIC) | 482 | COMPATIBLE_IOCTL(DRM_IOCTL_GET_MAGIC) |
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 | ||
569 | static 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 | |||
568 | static int openprom_open(struct inode * inode, struct file * file) | 601 | static int openprom_open(struct inode * inode, struct file * file) |
569 | { | 602 | { |
570 | DATA *data; | 603 | DATA *data; |