diff options
Diffstat (limited to 'drivers/media/video/v4l2-compat-ioctl32.c')
-rw-r--r-- | drivers/media/video/v4l2-compat-ioctl32.c | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/drivers/media/video/v4l2-compat-ioctl32.c b/drivers/media/video/v4l2-compat-ioctl32.c index d0e1bd3ace6a..110376be5d2b 100644 --- a/drivers/media/video/v4l2-compat-ioctl32.c +++ b/drivers/media/video/v4l2-compat-ioctl32.c | |||
@@ -222,9 +222,9 @@ static int get_microcode32(struct video_code *kp, struct video_code32 __user *up | |||
222 | 222 | ||
223 | #endif | 223 | #endif |
224 | 224 | ||
225 | static int native_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | 225 | static long native_ioctl(struct file *file, unsigned int cmd, unsigned long arg) |
226 | { | 226 | { |
227 | int ret = -ENOIOCTLCMD; | 227 | long ret = -ENOIOCTLCMD; |
228 | 228 | ||
229 | if (file->f_op->unlocked_ioctl) | 229 | if (file->f_op->unlocked_ioctl) |
230 | ret = file->f_op->unlocked_ioctl(file, cmd, arg); | 230 | ret = file->f_op->unlocked_ioctl(file, cmd, arg); |
@@ -705,7 +705,7 @@ static int put_v4l2_ext_controls32(struct v4l2_ext_controls *kp, struct v4l2_ext | |||
705 | #define VIDIOC_G_OUTPUT32 _IOR ('V', 46, s32) | 705 | #define VIDIOC_G_OUTPUT32 _IOR ('V', 46, s32) |
706 | #define VIDIOC_S_OUTPUT32 _IOWR('V', 47, s32) | 706 | #define VIDIOC_S_OUTPUT32 _IOWR('V', 47, s32) |
707 | 707 | ||
708 | static int do_video_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | 708 | static long do_video_ioctl(struct file *file, unsigned int cmd, unsigned long arg) |
709 | { | 709 | { |
710 | union { | 710 | union { |
711 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | 711 | #ifdef CONFIG_VIDEO_V4L1_COMPAT |
@@ -726,7 +726,7 @@ static int do_video_ioctl(struct file *file, unsigned int cmd, unsigned long arg | |||
726 | } karg; | 726 | } karg; |
727 | void __user *up = compat_ptr(arg); | 727 | void __user *up = compat_ptr(arg); |
728 | int compatible_arg = 1; | 728 | int compatible_arg = 1; |
729 | int err = 0; | 729 | long err = 0; |
730 | 730 | ||
731 | /* First, convert the command. */ | 731 | /* First, convert the command. */ |
732 | switch (cmd) { | 732 | switch (cmd) { |
@@ -937,9 +937,9 @@ static int do_video_ioctl(struct file *file, unsigned int cmd, unsigned long arg | |||
937 | return err; | 937 | return err; |
938 | } | 938 | } |
939 | 939 | ||
940 | long v4l_compat_ioctl32(struct file *file, unsigned int cmd, unsigned long arg) | 940 | long v4l2_compat_ioctl32(struct file *file, unsigned int cmd, unsigned long arg) |
941 | { | 941 | { |
942 | int ret = -ENOIOCTLCMD; | 942 | long ret = -ENOIOCTLCMD; |
943 | 943 | ||
944 | if (!file->f_op->ioctl && !file->f_op->unlocked_ioctl) | 944 | if (!file->f_op->ioctl && !file->f_op->unlocked_ioctl) |
945 | return ret; | 945 | return ret; |
@@ -1046,7 +1046,8 @@ long v4l_compat_ioctl32(struct file *file, unsigned int cmd, unsigned long arg) | |||
1046 | case VIDIOC_TRY_ENCODER_CMD: | 1046 | case VIDIOC_TRY_ENCODER_CMD: |
1047 | case VIDIOC_DBG_S_REGISTER: | 1047 | case VIDIOC_DBG_S_REGISTER: |
1048 | case VIDIOC_DBG_G_REGISTER: | 1048 | case VIDIOC_DBG_G_REGISTER: |
1049 | case VIDIOC_G_CHIP_IDENT: | 1049 | case VIDIOC_DBG_G_CHIP_IDENT: |
1050 | case VIDIOC_G_CHIP_IDENT_OLD: | ||
1050 | case VIDIOC_S_HW_FREQ_SEEK: | 1051 | case VIDIOC_S_HW_FREQ_SEEK: |
1051 | ret = do_video_ioctl(file, cmd, arg); | 1052 | ret = do_video_ioctl(file, cmd, arg); |
1052 | break; | 1053 | break; |
@@ -1065,18 +1066,14 @@ long v4l_compat_ioctl32(struct file *file, unsigned int cmd, unsigned long arg) | |||
1065 | break; | 1066 | break; |
1066 | #endif | 1067 | #endif |
1067 | default: | 1068 | default: |
1068 | v4l_print_ioctl("compat_ioctl32", cmd); | 1069 | printk(KERN_WARNING "compat_ioctl32: " |
1069 | printk(KERN_CONT "\n"); | 1070 | "unknown ioctl '%c', dir=%d, #%d (0x%08x)\n", |
1071 | _IOC_TYPE(cmd), _IOC_DIR(cmd), _IOC_NR(cmd), cmd); | ||
1070 | break; | 1072 | break; |
1071 | } | 1073 | } |
1072 | return ret; | 1074 | return ret; |
1073 | } | 1075 | } |
1074 | #else | 1076 | EXPORT_SYMBOL_GPL(v4l2_compat_ioctl32); |
1075 | long v4l_compat_ioctl32(struct file *file, unsigned int cmd, unsigned long arg) | ||
1076 | { | ||
1077 | return -ENOIOCTLCMD; | ||
1078 | } | ||
1079 | #endif | 1077 | #endif |
1080 | EXPORT_SYMBOL_GPL(v4l_compat_ioctl32); | ||
1081 | 1078 | ||
1082 | MODULE_LICENSE("GPL"); | 1079 | MODULE_LICENSE("GPL"); |