[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>
This commit is contained in:

committed by
Mauro Carvalho Chehab

parent
ab3cacf6d9
commit
ab58a30162
@@ -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);
|
||||
|
Reference in New Issue
Block a user