From 069b747931f13eda289c1d59a09ecc8162281a76 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Tue, 30 Dec 2008 07:04:34 -0300 Subject: 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 Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- include/media/saa7146_vv.h | 4 ++-- include/media/v4l2-dev.h | 2 +- include/media/v4l2-device.h | 2 +- include/media/v4l2-ioctl.h | 10 +++++----- include/media/v4l2-subdev.h | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) (limited to 'include') diff --git a/include/media/saa7146_vv.h b/include/media/saa7146_vv.h index fd7f4fe8c1a0..c8d0b23fde29 100644 --- a/include/media/saa7146_vv.h +++ b/include/media/saa7146_vv.h @@ -177,7 +177,7 @@ struct saa7146_ext_vv int (*std_callback)(struct saa7146_dev*, struct saa7146_standard *); struct saa7146_extension_ioctls *ioctls; - int (*ioctl)(struct saa7146_fh*, unsigned int cmd, void *arg); + long (*ioctl)(struct saa7146_fh *, unsigned int cmd, void *arg); struct v4l2_file_operations vbi_fops; }; @@ -216,7 +216,7 @@ void saa7146_set_gpio(struct saa7146_dev *saa, u8 pin, u8 data); extern struct saa7146_use_ops saa7146_video_uops; int saa7146_start_preview(struct saa7146_fh *fh); int saa7146_stop_preview(struct saa7146_fh *fh); -int saa7146_video_do_ioctl(struct file *file, unsigned int cmd, void *arg); +long saa7146_video_do_ioctl(struct file *file, unsigned int cmd, void *arg); /* from saa7146_vbi.c */ extern struct saa7146_use_ops saa7146_vbi_uops; diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h index 4d8ce34551df..e36faab8459b 100644 --- a/include/media/v4l2-dev.h +++ b/include/media/v4l2-dev.h @@ -38,7 +38,7 @@ struct v4l2_file_operations { ssize_t (*read) (struct file *, char __user *, size_t, loff_t *); ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *); unsigned int (*poll) (struct file *, struct poll_table_struct *); - int (*ioctl) (struct file *, unsigned int, unsigned long); + long (*ioctl) (struct file *, unsigned int, unsigned long); long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); int (*mmap) (struct file *, struct vm_area_struct *); int (*open) (struct file *); diff --git a/include/media/v4l2-device.h b/include/media/v4l2-device.h index 97b283a04289..9bf4ccc93dbf 100644 --- a/include/media/v4l2-device.h +++ b/include/media/v4l2-device.h @@ -80,7 +80,7 @@ void v4l2_device_unregister_subdev(struct v4l2_subdev *sd); #define __v4l2_device_call_subdevs_until_err(dev, cond, o, f, args...) \ ({ \ struct v4l2_subdev *sd; \ - int err = 0; \ + long err = 0; \ \ list_for_each_entry(sd, &(dev)->subdevs, list) { \ if ((cond) && sd->ops->o && sd->ops->o->f) \ diff --git a/include/media/v4l2-ioctl.h b/include/media/v4l2-ioctl.h index 835af438e4f8..172c39678c5a 100644 --- a/include/media/v4l2-ioctl.h +++ b/include/media/v4l2-ioctl.h @@ -239,7 +239,7 @@ struct v4l2_ioctl_ops { struct v4l2_frmivalenum *fival); /* For other private ioctls */ - int (*vidioc_default) (struct file *file, void *fh, + long (*vidioc_default) (struct file *file, void *fh, int cmd, void *arg); }; @@ -277,10 +277,10 @@ extern const char *v4l2_field_names[]; extern const char *v4l2_type_names[]; /* Compatibility layer interface -- v4l1-compat module */ -typedef int (*v4l2_kioctl)(struct file *file, +typedef long (*v4l2_kioctl)(struct file *file, unsigned int cmd, void *arg); #ifdef CONFIG_VIDEO_V4L1_COMPAT -int v4l_compat_translate_ioctl(struct file *file, +long v4l_compat_translate_ioctl(struct file *file, int cmd, void *arg, v4l2_kioctl driver_ioctl); #else #define v4l_compat_translate_ioctl(file, cmd, arg, ioctl) (-EINVAL) @@ -293,11 +293,11 @@ extern long v4l_compat_ioctl32(struct file *file, unsigned int cmd, #endif /* Include support for obsoleted stuff */ -extern int video_usercopy(struct file *file, unsigned int cmd, +extern long video_usercopy(struct file *file, unsigned int cmd, unsigned long arg, v4l2_kioctl func); /* Standard handlers for V4L ioctl's */ -extern int video_ioctl2(struct file *file, +extern long video_ioctl2(struct file *file, unsigned int cmd, unsigned long arg); #endif /* _V4L2_IOCTL_H */ diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h index ceef016bb0b7..2517344313b6 100644 --- a/include/media/v4l2-subdev.h +++ b/include/media/v4l2-subdev.h @@ -79,7 +79,7 @@ struct v4l2_subdev_core_ops { int (*g_ctrl)(struct v4l2_subdev *sd, struct v4l2_control *ctrl); int (*s_ctrl)(struct v4l2_subdev *sd, struct v4l2_control *ctrl); int (*querymenu)(struct v4l2_subdev *sd, struct v4l2_querymenu *qm); - int (*ioctl)(struct v4l2_subdev *sd, unsigned int cmd, void *arg); + long (*ioctl)(struct v4l2_subdev *sd, unsigned int cmd, void *arg); #ifdef CONFIG_VIDEO_ADV_DEBUG int (*g_register)(struct v4l2_subdev *sd, struct v4l2_register *reg); int (*s_register)(struct v4l2_subdev *sd, struct v4l2_register *reg); -- cgit v1.2.3-59-g8ed1b