diff options
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/viotape.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/drivers/char/viotape.c b/drivers/char/viotape.c index c39ddaff5e8f..d4db42ca71e6 100644 --- a/drivers/char/viotape.c +++ b/drivers/char/viotape.c | |||
@@ -46,6 +46,7 @@ | |||
46 | #include <linux/completion.h> | 46 | #include <linux/completion.h> |
47 | #include <linux/proc_fs.h> | 47 | #include <linux/proc_fs.h> |
48 | #include <linux/seq_file.h> | 48 | #include <linux/seq_file.h> |
49 | #include <linux/smp_lock.h> | ||
49 | 50 | ||
50 | #include <asm/uaccess.h> | 51 | #include <asm/uaccess.h> |
51 | #include <asm/ioctls.h> | 52 | #include <asm/ioctls.h> |
@@ -677,6 +678,17 @@ free_op: | |||
677 | return ret; | 678 | return ret; |
678 | } | 679 | } |
679 | 680 | ||
681 | static long viotap_unlocked_ioctl(struct file *file, | ||
682 | unsigned int cmd, unsigned long arg) | ||
683 | { | ||
684 | long rc; | ||
685 | |||
686 | lock_kernel(); | ||
687 | rc = viotap_ioctl(file->f_path.dentry->d_inode, file, cmd, arg); | ||
688 | unlock_kernel(); | ||
689 | return rc; | ||
690 | } | ||
691 | |||
680 | static int viotap_open(struct inode *inode, struct file *file) | 692 | static int viotap_open(struct inode *inode, struct file *file) |
681 | { | 693 | { |
682 | HvLpEvent_Rc hvrc; | 694 | HvLpEvent_Rc hvrc; |
@@ -783,12 +795,12 @@ free_op: | |||
783 | } | 795 | } |
784 | 796 | ||
785 | const struct file_operations viotap_fops = { | 797 | const struct file_operations viotap_fops = { |
786 | .owner = THIS_MODULE, | 798 | .owner = THIS_MODULE, |
787 | .read = viotap_read, | 799 | .read = viotap_read, |
788 | .write = viotap_write, | 800 | .write = viotap_write, |
789 | .ioctl = viotap_ioctl, | 801 | .unlocked_ioctl = viotap_unlocked_ioctl, |
790 | .open = viotap_open, | 802 | .open = viotap_open, |
791 | .release = viotap_release, | 803 | .release = viotap_release, |
792 | }; | 804 | }; |
793 | 805 | ||
794 | /* Handle interrupt events for tape */ | 806 | /* Handle interrupt events for tape */ |