On 02/05/2018 10:36 PM, Florian Echtler wrote: > Hello Hans, > > On Mon, 5 Feb 2018, Hans Verkuil wrote: >> On 02/05/2018 03:29 PM, Florian Echtler wrote: >>> + >>> +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 -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html