From: Hans Verkuil Date: Thu, 10 May 2012 08:36:00 +0000 (-0300) Subject: [media] v4l2-dev/ioctl: determine the valid ioctls upfront X-Git-Tag: v3.5-rc1~104^2~275 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=48ea0be06028d97b57602372f032afbec02e7e97;p=pandora-kernel.git [media] v4l2-dev/ioctl: determine the valid ioctls upfront Rather than testing whether an ioctl is implemented in the driver or not every time the ioctl is called, do it upfront when the device is registered. This also allows a driver to disable certain ioctls based on the capabilities of the detected board, something you can't do today without creating separate v4l2_ioctl_ops structs for each new variation. For the most part it is pretty straightforward, but for control ioctls a flag is needed since it is possible that you have per-filehandle controls, and that can't be determined upfront of course. Signed-off-by: Hans Verkuil Acked-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab --- Reading git-diff-tree failed