Re: [PATCH] v4l2-compat-ioctl32.c: make ctrl_is_pointer work for subdevs

2018-01-30 Thread Laurent Pinchart
Hi Hans, Thank you for the patch. On Tuesday, 30 January 2018 17:18:32 EET Hans Verkuil wrote: > If the device is of type VFL_TYPE_SUBDEV then vdev->ioctl_ops > is NULL so the 'if (!ops->vidioc_query_ext_ctrl)' check would fail. More than that, it would crash. > Add a test for !ops to the condi

Re: [PATCH] v4l2-compat-ioctl32.c: make ctrl_is_pointer work for subdevs

2018-01-30 Thread Sakari Ailus
On Tue, Jan 30, 2018 at 04:18:32PM +0100, Hans Verkuil wrote: > If the device is of type VFL_TYPE_SUBDEV then vdev->ioctl_ops > is NULL so the 'if (!ops->vidioc_query_ext_ctrl)' check would fail. > Add a test for !ops to the condition. > > All sub-devices that have controls will use the control fr

[PATCH] v4l2-compat-ioctl32.c: make ctrl_is_pointer work for subdevs

2018-01-30 Thread Hans Verkuil
If the device is of type VFL_TYPE_SUBDEV then vdev->ioctl_ops is NULL so the 'if (!ops->vidioc_query_ext_ctrl)' check would fail. Add a test for !ops to the condition. All sub-devices that have controls will use the control framework, so they do not have an equivalent to ops->vidioc_query_ext_ctrl