diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2014-02-10 08:08:44 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-02-24 10:57:14 -0300 |
commit | ab58a30162f0383c06388af522bc889a5da38fc6 (patch) | |
tree | 610feb6fafb2f7a567f85627ef666c4b83804d02 /include/media | |
parent | ab3cacf6d92b0c0b4b5c8817b8988dc67a6397ac (diff) |
[media] v4l2-subdev: Allow 32-bit compat ioctls
Add support for 32-bit ioctls with v4l-subdev device nodes.
Rather than keep adding new ioctls to the list in v4l2-compat-ioctl32.c, just check
if the ioctl is a non-private V4L2 ioctl and if so, call the conversion code.
We keep forgetting to add new ioctls, so this is a more robust solution.
In addition extend the subdev API with support for a compat32 function to
convert custom v4l-subdev ioctls.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Tested-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'include/media')
-rw-r--r-- | include/media/v4l2-subdev.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h index d67210a37ef3..1752530f69bc 100644 --- a/include/media/v4l2-subdev.h +++ b/include/media/v4l2-subdev.h @@ -162,6 +162,10 @@ struct v4l2_subdev_core_ops { int (*g_std)(struct v4l2_subdev *sd, v4l2_std_id *norm); int (*s_std)(struct v4l2_subdev *sd, v4l2_std_id norm); long (*ioctl)(struct v4l2_subdev *sd, unsigned int cmd, void *arg); +#ifdef CONFIG_COMPAT + long (*compat_ioctl32)(struct v4l2_subdev *sd, unsigned int cmd, + unsigned long arg); +#endif #ifdef CONFIG_VIDEO_ADV_DEBUG int (*g_register)(struct v4l2_subdev *sd, struct v4l2_dbg_register *reg); int (*s_register)(struct v4l2_subdev *sd, const struct v4l2_dbg_register *reg); |