diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2008-05-23 06:57:41 -0400 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2008-07-14 07:06:02 -0400 |
commit | 3aea50a379ed152bcb86b24b65a4cb59be82446f (patch) | |
tree | 910ad6bfae5f5f2240da3511d9db8411b7ece6e3 /drivers/ieee1394 | |
parent | 055a7da0bb7b14f2f5009bf1c486a6e965e1e7ac (diff) |
ieee1394: raw1394: Push the BKL down into the driver ioctls
Actually in this case wrap the function for now.
Signed-off-by: Alan Cox <alan@redhat.com>
Added raw1394_compat_ioctl hunk.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/ieee1394')
-rw-r--r-- | drivers/ieee1394/raw1394.c | 20 |
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 */ |
2552 | static int raw1394_ioctl(struct inode *inode, struct file *file, | 2552 | static 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 | ||
2659 | static 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 |
2660 | struct raw1394_iso_packets32 { | 2670 | struct 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 |