aboutsummaryrefslogtreecommitdiffstats
path: root/include/media/v4l2-event.h
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2011-06-20 10:56:24 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-07-27 16:53:34 -0400
commit3f66f0ed319505555f45ceac04775b23f9279ee6 (patch)
tree27796db307bf941b8297b639b4cb2b9a48ffc689 /include/media/v4l2-event.h
parente969084030b03f4997d63b3f718ba814290e0705 (diff)
[media] v4l2-ctrls/v4l2-events: small coding style cleanups
Thanks to Laurent Pinchart <laurent.pinchart@ideasonboard.com>. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include/media/v4l2-event.h')
-rw-r--r--include/media/v4l2-event.h34
1 files changed, 19 insertions, 15 deletions
diff --git a/include/media/v4l2-event.h b/include/media/v4l2-event.h
index 6da793fa4d34..7abeb397d130 100644
--- a/include/media/v4l2-event.h
+++ b/include/media/v4l2-event.h
@@ -33,41 +33,45 @@ struct v4l2_fh;
33struct v4l2_subscribed_event; 33struct v4l2_subscribed_event;
34struct video_device; 34struct video_device;
35 35
36/** struct v4l2_kevent - Internal kernel event struct.
37 * @list: List node for the v4l2_fh->available list.
38 * @sev: Pointer to parent v4l2_subscribed_event.
39 * @event: The event itself.
40 */
36struct v4l2_kevent { 41struct v4l2_kevent {
37 /* list node for the v4l2_fh->available list */
38 struct list_head list; 42 struct list_head list;
39 /* pointer to parent v4l2_subscribed_event */
40 struct v4l2_subscribed_event *sev; 43 struct v4l2_subscribed_event *sev;
41 /* event itself */
42 struct v4l2_event event; 44 struct v4l2_event event;
43}; 45};
44 46
47/** struct v4l2_subscribed_event - Internal struct representing a subscribed event.
48 * @list: List node for the v4l2_fh->subscribed list.
49 * @type: Event type.
50 * @id: Associated object ID (e.g. control ID). 0 if there isn't any.
51 * @flags: Copy of v4l2_event_subscription->flags.
52 * @fh: Filehandle that subscribed to this event.
53 * @node: List node that hooks into the object's event list (if there is one).
54 * @replace: Optional callback that can replace event 'old' with event 'new'.
55 * @merge: Optional callback that can merge event 'old' into event 'new'.
56 * @elems: The number of elements in the events array.
57 * @first: The index of the events containing the oldest available event.
58 * @in_use: The number of queued events.
59 * @events: An array of @elems events.
60 */
45struct v4l2_subscribed_event { 61struct v4l2_subscribed_event {
46 /* list node for the v4l2_fh->subscribed list */
47 struct list_head list; 62 struct list_head list;
48 /* event type */
49 u32 type; 63 u32 type;
50 /* associated object ID (e.g. control ID) */
51 u32 id; 64 u32 id;
52 /* copy of v4l2_event_subscription->flags */
53 u32 flags; 65 u32 flags;
54 /* filehandle that subscribed to this event */
55 struct v4l2_fh *fh; 66 struct v4l2_fh *fh;
56 /* list node that hooks into the object's event list (if there is one) */
57 struct list_head node; 67 struct list_head node;
58 /* Optional callback that can replace event 'old' with event 'new'. */
59 void (*replace)(struct v4l2_event *old, 68 void (*replace)(struct v4l2_event *old,
60 const struct v4l2_event *new); 69 const struct v4l2_event *new);
61 /* Optional callback that can merge event 'old' into event 'new'. */
62 void (*merge)(const struct v4l2_event *old, 70 void (*merge)(const struct v4l2_event *old,
63 struct v4l2_event *new); 71 struct v4l2_event *new);
64 /* the number of elements in the events array */
65 unsigned elems; 72 unsigned elems;
66 /* the index of the events containing the oldest available event */
67 unsigned first; 73 unsigned first;
68 /* the number of queued events */
69 unsigned in_use; 74 unsigned in_use;
70 /* an array of elems events */
71 struct v4l2_kevent events[]; 75 struct v4l2_kevent events[];
72}; 76};
73 77