diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2008-12-30 05:04:34 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-01-02 14:11:34 -0500 |
commit | 069b747931f13eda289c1d59a09ecc8162281a76 (patch) | |
tree | 144b8ebf131eba4f3468d8d3f52bd192bc2e4f76 /drivers/media/video/v4l2-compat-ioctl32.c | |
parent | 4ab9203b1b7e45f1beae7eb0c67d663a26257a69 (diff) |
V4L/DVB (10138): v4l2-ioctl: change to long return type to match unlocked_ioctl.
Since internal to v4l2 the ioctl prototype is the same regardless of it
being called through .ioctl or .unlocked_ioctl, we need to convert it all
to the long return type of unlocked_ioctl.
Thanks to Jean-Francois Moine for posting an initial patch for this and
thus bringing it to our attention.
Cc: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/v4l2-compat-ioctl32.c')
-rw-r--r-- | drivers/media/video/v4l2-compat-ioctl32.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/media/video/v4l2-compat-ioctl32.c b/drivers/media/video/v4l2-compat-ioctl32.c index b4f39143185..28861e4910f 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) { |
@@ -939,7 +939,7 @@ static int do_video_ioctl(struct file *file, unsigned int cmd, unsigned long arg | |||
939 | 939 | ||
940 | long v4l_compat_ioctl32(struct file *file, unsigned int cmd, unsigned long arg) | 940 | long v4l_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; |