diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2011-06-13 17:55:58 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-07-27 16:53:31 -0400 |
commit | 77068d36d8b9e9902a89b4bb01011d41926f5420 (patch) | |
tree | 4fde4974ce56e52acac5c7c8d873d300e946adcc /include/media/v4l2-ctrls.h | |
parent | 523f46d6aba9dcb0a2d0fc474ca884e93a7cf198 (diff) |
[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; | |||
31 | struct video_device; | 31 | struct video_device; |
32 | struct v4l2_subdev; | 32 | struct v4l2_subdev; |
33 | struct v4l2_event_subscription; | 33 | struct v4l2_event_subscription; |
34 | struct v4l2_subscribed_event; | ||
34 | struct v4l2_fh; | 35 | struct v4l2_fh; |
35 | 36 | ||
36 | /** struct v4l2_ctrl_ops - The control operations that the driver has to provide. | 37 | /** struct v4l2_ctrl_ops - The control operations that the driver has to provide. |
@@ -53,6 +54,7 @@ struct v4l2_ctrl_ops { | |||
53 | 54 | ||
54 | /** struct v4l2_ctrl - The control structure. | 55 | /** struct v4l2_ctrl - The control structure. |
55 | * @node: The list node. | 56 | * @node: The list node. |
57 | * @ev_subs: The list of control event subscriptions. | ||
56 | * @handler: The handler that owns the control. | 58 | * @handler: The handler that owns the control. |
57 | * @cluster: Point to start of cluster array. | 59 | * @cluster: Point to start of cluster array. |
58 | * @ncontrols: Number of controls in cluster array. | 60 | * @ncontrols: Number of controls in cluster array. |
@@ -108,7 +110,7 @@ struct v4l2_ctrl_ops { | |||
108 | struct v4l2_ctrl { | 110 | struct v4l2_ctrl { |
109 | /* Administrative fields */ | 111 | /* Administrative fields */ |
110 | struct list_head node; | 112 | struct list_head node; |
111 | struct list_head fhs; | 113 | struct list_head ev_subs; |
112 | struct v4l2_ctrl_handler *handler; | 114 | struct v4l2_ctrl_handler *handler; |
113 | struct v4l2_ctrl **cluster; | 115 | struct v4l2_ctrl **cluster; |
114 | unsigned ncontrols; | 116 | unsigned ncontrols; |
@@ -184,11 +186,6 @@ struct v4l2_ctrl_handler { | |||
184 | int error; | 186 | int error; |
185 | }; | 187 | }; |
186 | 188 | ||
187 | struct v4l2_ctrl_fh { | ||
188 | struct list_head node; | ||
189 | struct v4l2_fh *fh; | ||
190 | }; | ||
191 | |||
192 | /** struct v4l2_ctrl_config - Control configuration structure. | 189 | /** struct v4l2_ctrl_config - Control configuration structure. |
193 | * @ops: The control ops. | 190 | * @ops: The control ops. |
194 | * @id: The control ID. | 191 | * @id: The control ID. |
@@ -497,10 +494,10 @@ s32 v4l2_ctrl_g_ctrl(struct v4l2_ctrl *ctrl); | |||
497 | int v4l2_ctrl_s_ctrl(struct v4l2_ctrl *ctrl, s32 val); | 494 | int v4l2_ctrl_s_ctrl(struct v4l2_ctrl *ctrl, s32 val); |
498 | 495 | ||
499 | /* Internal helper functions that deal with control events. */ | 496 | /* Internal helper functions that deal with control events. */ |
500 | void v4l2_ctrl_add_fh(struct v4l2_ctrl_handler *hdl, | 497 | void v4l2_ctrl_add_event(struct v4l2_ctrl *ctrl, |
501 | struct v4l2_ctrl_fh *ctrl_fh, | 498 | struct v4l2_subscribed_event *sev); |
502 | struct v4l2_event_subscription *sub); | 499 | void v4l2_ctrl_del_event(struct v4l2_ctrl *ctrl, |
503 | void v4l2_ctrl_del_fh(struct v4l2_ctrl *ctrl, struct v4l2_fh *fh); | 500 | struct v4l2_subscribed_event *sev); |
504 | 501 | ||
505 | /** v4l2_ctrl_subscribe_fh() - Helper function that subscribes a control event. | 502 | /** v4l2_ctrl_subscribe_fh() - Helper function that subscribes a control event. |
506 | * @fh: The file handler that subscribed the control event. | 503 | * @fh: The file handler that subscribed the control event. |