summaryrefslogtreecommitdiffstats
path: root/include/media/v4l2-ctrls.h
diff options
context:
space:
mode:
authorSylwester Nawrocki2013-01-22 23:00:23 +0100
committerMauro Carvalho Chehab2013-02-05 18:05:26 +0100
commit22fa4279eebc3fa4b3c3dc2b190158dbbafcda9f (patch)
tree35e661c4993be3dda8342f836c8a7d7dc9e067c6 /include/media/v4l2-ctrls.h
parent[media] V4L: Add v4l2_event_subdev_unsubscribe() helper function (diff)
downloadkernel-qcow2-linux-22fa4279eebc3fa4b3c3dc2b190158dbbafcda9f.tar.gz
kernel-qcow2-linux-22fa4279eebc3fa4b3c3dc2b190158dbbafcda9f.tar.xz
kernel-qcow2-linux-22fa4279eebc3fa4b3c3dc2b190158dbbafcda9f.zip
[media] V4L: Add v4l2_ctrl_subdev_subscribe_event() helper function
Add a v4l2 core helper function that can be used as the subdev .subscribe_event handler. This allows to eliminate some boilerplate from drivers that are only handling the control events. Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include/media/v4l2-ctrls.h')
-rw-r--r--include/media/v4l2-ctrls.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/media/v4l2-ctrls.h b/include/media/v4l2-ctrls.h
index 91125b6f05a5..1e849461fc9d 100644
--- a/include/media/v4l2-ctrls.h
+++ b/include/media/v4l2-ctrls.h
@@ -654,4 +654,9 @@ int v4l2_subdev_s_ext_ctrls(struct v4l2_subdev *sd, struct v4l2_ext_controls *cs
int v4l2_subdev_g_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl);
int v4l2_subdev_s_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl);
+/* Can be used as a subscribe_event function that just subscribes control
+ events. */
+int v4l2_ctrl_subdev_subscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh,
+ struct v4l2_event_subscription *sub);
+
#endif