diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2011-06-13 23:55:58 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-07-27 22:53:31 +0200 |
commit | 77068d36d8b9e9902a89b4bb01011d41926f5420 (patch) | |
tree | 4fde4974ce56e52acac5c7c8d873d300e946adcc /include/media/v4l2-ctrls.h | |
parent | [media] v4l2-events/fh: merge v4l2_events into v4l2_fh (diff) | |
download | linux-77068d36d8b9e9902a89b4bb01011d41926f5420.tar.xz linux-77068d36d8b9e9902a89b4bb01011d41926f5420.zip |
[media] v4l2-ctrls/event: remove struct v4l2_ctrl_fh, instead use v4l2_subscribed_event
The v4l2_ctrl_fh struct connected v4l2_ctrl with v4l2_fh so the control
would know which filehandles subscribed to it. However, it is much easier
to use struct v4l2_subscribed_event directly for that and get rid of that
intermediate struct.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.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.h | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/include/media/v4l2-ctrls.h b/include/media/v4l2-ctrls.h index 8f08c6edf509..a15e9098f98b 100644 --- a/include/media/v4l2-ctrls.h +++ b/include/media/v4l2-ctrls.h @@ -31,6 +31,7 @@ struct v4l2_ctrl; struct video_device; struct v4l2_subdev; struct v4l2_event_subscription; +struct v4l2_subscribed_event; struct v4l2_fh; /** struct v4l2_ctrl_ops - The control operations that the driver has to provide. @@ -53,6 +54,7 @@ struct v4l2_ctrl_ops { /** struct v4l2_ctrl - The control structure. * @node: The list node. + * @ev_subs: The list of control event subscriptions. * @handler: The handler that owns the control. * @cluster: Point to start of cluster array. * @ncontrols: Number of controls in cluster array. @@ -108,7 +110,7 @@ struct v4l2_ctrl_ops { struct v4l2_ctrl { /* Administrative fields */ struct list_head node; - struct list_head fhs; + struct list_head ev_subs; struct v4l2_ctrl_handler *handler; struct v4l2_ctrl **cluster; unsigned ncontrols; @@ -184,11 +186,6 @@ struct v4l2_ctrl_handler { int error; }; -struct v4l2_ctrl_fh { - struct list_head node; - struct v4l2_fh *fh; -}; - /** struct v4l2_ctrl_config - Control configuration structure. * @ops: The control ops. * @id: The control ID. @@ -497,10 +494,10 @@ s32 v4l2_ctrl_g_ctrl(struct v4l2_ctrl *ctrl); int v4l2_ctrl_s_ctrl(struct v4l2_ctrl *ctrl, s32 val); /* Internal helper functions that deal with control events. */ -void v4l2_ctrl_add_fh(struct v4l2_ctrl_handler *hdl, - struct v4l2_ctrl_fh *ctrl_fh, - struct v4l2_event_subscription *sub); -void v4l2_ctrl_del_fh(struct v4l2_ctrl *ctrl, struct v4l2_fh *fh); +void v4l2_ctrl_add_event(struct v4l2_ctrl *ctrl, + struct v4l2_subscribed_event *sev); +void v4l2_ctrl_del_event(struct v4l2_ctrl *ctrl, + struct v4l2_subscribed_event *sev); /** v4l2_ctrl_subscribe_fh() - Helper function that subscribes a control event. * @fh: The file handler that subscribed the control event. |