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>

authored by

Alan Cox and committed by
Stefan Richter
3aea50a3 055a7da0

+15 -5
+15 -5
drivers/ieee1394/raw1394.c
··· 2549 } 2550 2551 /* ioctl is only used for rawiso operations */ 2552 - static int raw1394_ioctl(struct inode *inode, struct file *file, 2553 - unsigned int cmd, unsigned long arg) 2554 { 2555 struct file_info *fi = file->private_data; 2556 void __user *argp = (void __user *)arg; ··· 2656 return -EINVAL; 2657 } 2658 2659 #ifdef CONFIG_COMPAT 2660 struct raw1394_iso_packets32 { 2661 __u32 n_packets; ··· 2700 !copy_from_user(&infos32, &arg->infos, sizeof infos32)) { 2701 infos = compat_ptr(infos32); 2702 if (!copy_to_user(&dst->infos, &infos, sizeof infos)) 2703 - err = raw1394_ioctl(NULL, file, cmd, (unsigned long)dst); 2704 } 2705 return err; 2706 } ··· 2741 case RAW1394_IOC_ISO_GET_STATUS: 2742 case RAW1394_IOC_ISO_SHUTDOWN: 2743 case RAW1394_IOC_ISO_QUEUE_ACTIVITY: 2744 - err = raw1394_ioctl(NULL, file, cmd, arg); 2745 break; 2746 /* These request have different format. */ 2747 case RAW1394_IOC_ISO_RECV_PACKETS32: ··· 2994 .read = raw1394_read, 2995 .write = raw1394_write, 2996 .mmap = raw1394_mmap, 2997 - .ioctl = raw1394_ioctl, 2998 #ifdef CONFIG_COMPAT 2999 .compat_ioctl = raw1394_compat_ioctl, 3000 #endif
··· 2549 } 2550 2551 /* ioctl is only used for rawiso operations */ 2552 + static long do_raw1394_ioctl(struct file *file, unsigned int cmd, 2553 + unsigned long arg) 2554 { 2555 struct file_info *fi = file->private_data; 2556 void __user *argp = (void __user *)arg; ··· 2656 return -EINVAL; 2657 } 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 + 2669 #ifdef CONFIG_COMPAT 2670 struct raw1394_iso_packets32 { 2671 __u32 n_packets; ··· 2690 !copy_from_user(&infos32, &arg->infos, sizeof infos32)) { 2691 infos = compat_ptr(infos32); 2692 if (!copy_to_user(&dst->infos, &infos, sizeof infos)) 2693 + err = do_raw1394_ioctl(file, cmd, (unsigned long)dst); 2694 } 2695 return err; 2696 } ··· 2731 case RAW1394_IOC_ISO_GET_STATUS: 2732 case RAW1394_IOC_ISO_SHUTDOWN: 2733 case RAW1394_IOC_ISO_QUEUE_ACTIVITY: 2734 + err = do_raw1394_ioctl(file, cmd, arg); 2735 break; 2736 /* These request have different format. */ 2737 case RAW1394_IOC_ISO_RECV_PACKETS32: ··· 2984 .read = raw1394_read, 2985 .write = raw1394_write, 2986 .mmap = raw1394_mmap, 2987 + .unlocked_ioctl = raw1394_ioctl, 2988 #ifdef CONFIG_COMPAT 2989 .compat_ioctl = raw1394_compat_ioctl, 2990 #endif