On 02/05/2018 10:36 PM, Florian Echtler wrote:
Hello Hans,
On Mon, 5 Feb 2018, Hans Verkuil wrote:
quoted
On 02/05/2018 03:29 PM, Florian Echtler wrote:
quoted
+
+static int sur40_vidioc_queryctrl(struct file *file, void *fh,
+ struct v4l2_queryctrl *qc)
Sorry, but this is very wrong. Use the control framework instead. See
https://hverkuil.home.xs4all.nl/spec/kapi/v4l2-controls.html and pretty much all
media drivers (with the exception of uvc). See for example this driver:
drivers/media/pci/tw68/tw68-video.c (randomly chosen).
It actually makes life a lot easier for you as you don't have to perform any
range checks and all control ioctls are automatically supported for you.
thanks for the quick reply, I wasn't aware of that framework at all :-)
Will certainly use it.
What's the earliest kernel version this is supported on, in case we want
to backport this for our standalone module, too?
Initial commit was in August 2010, so it's been around for quite some time :-)
Regards,
Hans