aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ieee1394/raw1394.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/drivers/ieee1394/raw1394.c b/drivers/ieee1394/raw1394.c
index ec2a0adbedb2..96f2847b0405 100644
--- a/drivers/ieee1394/raw1394.c
+++ b/drivers/ieee1394/raw1394.c
@@ -2549,8 +2549,8 @@ static int raw1394_mmap(struct file *file, struct vm_area_struct *vma)
2549} 2549}
2550 2550
2551/* ioctl is only used for rawiso operations */ 2551/* ioctl is only used for rawiso operations */
2552static int raw1394_ioctl(struct inode *inode, struct file *file, 2552static long do_raw1394_ioctl(struct file *file, unsigned int cmd,
2553 unsigned int cmd, unsigned long arg) 2553 unsigned long arg)
2554{ 2554{
2555 struct file_info *fi = file->private_data; 2555 struct file_info *fi = file->private_data;
2556 void __user *argp = (void __user *)arg; 2556 void __user *argp = (void __user *)arg;
@@ -2656,6 +2656,16 @@ static int raw1394_ioctl(struct inode *inode, struct file *file,
2656 return -EINVAL; 2656 return -EINVAL;
2657} 2657}
2658 2658
2659static long raw1394_ioctl(struct file *file, unsigned int cmd,
2660 unsigned long arg)
2661{
2662 long ret;
2663 lock_kernel();
2664 ret = do_raw1394_ioctl(file, cmd, arg);
2665 unlock_kernel();
2666 return ret;
2667}
2668
2659#ifdef CONFIG_COMPAT 2669#ifdef CONFIG_COMPAT
2660struct raw1394_iso_packets32 { 2670struct raw1394_iso_packets32 {
2661 __u32 n_packets; 2671 __u32 n_packets;
@@ -2690,7 +2700,7 @@ static long raw1394_iso_xmit_recv_packets32(struct file *file, unsigned int cmd,
2690 !copy_from_user(&infos32, &arg->infos, sizeof infos32)) { 2700 !copy_from_user(&infos32, &arg->infos, sizeof infos32)) {
2691 infos = compat_ptr(infos32); 2701 infos = compat_ptr(infos32);
2692 if (!copy_to_user(&dst->infos, &infos, sizeof infos)) 2702 if (!copy_to_user(&dst->infos, &infos, sizeof infos))
2693 err = raw1394_ioctl(NULL, file, cmd, (unsigned long)dst); 2703 err = do_raw1394_ioctl(file, cmd, (unsigned long)dst);
2694 } 2704 }
2695 return err; 2705 return err;
2696} 2706}
@@ -2731,7 +2741,7 @@ static long raw1394_compat_ioctl(struct file *file,
2731 case RAW1394_IOC_ISO_GET_STATUS: 2741 case RAW1394_IOC_ISO_GET_STATUS:
2732 case RAW1394_IOC_ISO_SHUTDOWN: 2742 case RAW1394_IOC_ISO_SHUTDOWN:
2733 case RAW1394_IOC_ISO_QUEUE_ACTIVITY: 2743 case RAW1394_IOC_ISO_QUEUE_ACTIVITY:
2734 err = raw1394_ioctl(NULL, file, cmd, arg); 2744 err = do_raw1394_ioctl(file, cmd, arg);
2735 break; 2745 break;
2736 /* These request have different format. */ 2746 /* These request have different format. */
2737 case RAW1394_IOC_ISO_RECV_PACKETS32: 2747 case RAW1394_IOC_ISO_RECV_PACKETS32:
@@ -2984,7 +2994,7 @@ static const struct file_operations raw1394_fops = {
2984 .read = raw1394_read, 2994 .read = raw1394_read,
2985 .write = raw1394_write, 2995 .write = raw1394_write,
2986 .mmap = raw1394_mmap, 2996 .mmap = raw1394_mmap,
2987 .ioctl = raw1394_ioctl, 2997 .unlocked_ioctl = raw1394_ioctl,
2988#ifdef CONFIG_COMPAT 2998#ifdef CONFIG_COMPAT
2989 .compat_ioctl = raw1394_compat_ioctl, 2999 .compat_ioctl = raw1394_compat_ioctl,
2990#endif 3000#endif