aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/media/v4l2-event.h11
-rw-r--r--include/media/v4l2-fh.h13
2 files changed, 10 insertions, 14 deletions
diff --git a/include/media/v4l2-event.h b/include/media/v4l2-event.h
index 45e9c1e05513..042b893035de 100644
--- a/include/media/v4l2-event.h
+++ b/include/media/v4l2-event.h
@@ -43,17 +43,6 @@ struct v4l2_subscribed_event {
43 u32 id; 43 u32 id;
44}; 44};
45 45
46struct v4l2_events {
47 wait_queue_head_t wait;
48 struct list_head subscribed; /* Subscribed events */
49 struct list_head free; /* Events ready for use */
50 struct list_head available; /* Dequeueable event */
51 unsigned int navailable;
52 unsigned int nallocated; /* Number of allocated events */
53 u32 sequence;
54};
55
56int v4l2_event_init(struct v4l2_fh *fh);
57int v4l2_event_alloc(struct v4l2_fh *fh, unsigned int n); 46int v4l2_event_alloc(struct v4l2_fh *fh, unsigned int n);
58void v4l2_event_free(struct v4l2_fh *fh); 47void v4l2_event_free(struct v4l2_fh *fh);
59int v4l2_event_dequeue(struct v4l2_fh *fh, struct v4l2_event *event, 48int v4l2_event_dequeue(struct v4l2_fh *fh, struct v4l2_event *event,
diff --git a/include/media/v4l2-fh.h b/include/media/v4l2-fh.h
index d2471116ad68..bfc0457ca6ef 100644
--- a/include/media/v4l2-fh.h
+++ b/include/media/v4l2-fh.h
@@ -29,15 +29,22 @@
29#include <linux/list.h> 29#include <linux/list.h>
30 30
31struct video_device; 31struct video_device;
32struct v4l2_events;
33struct v4l2_ctrl_handler; 32struct v4l2_ctrl_handler;
34 33
35struct v4l2_fh { 34struct v4l2_fh {
36 struct list_head list; 35 struct list_head list;
37 struct video_device *vdev; 36 struct video_device *vdev;
38 struct v4l2_events *events; /* events, pending and subscribed */
39 struct v4l2_ctrl_handler *ctrl_handler; 37 struct v4l2_ctrl_handler *ctrl_handler;
40 enum v4l2_priority prio; 38 enum v4l2_priority prio;
39
40 /* Events */
41 wait_queue_head_t wait;
42 struct list_head subscribed; /* Subscribed events */
43 struct list_head free; /* Events ready for use */
44 struct list_head available; /* Dequeueable event */
45 unsigned int navailable;
46 unsigned int nallocated; /* Number of allocated events */
47 u32 sequence;
41}; 48};
42 49
43/* 50/*
@@ -46,7 +53,7 @@ struct v4l2_fh {
46 * from driver's v4l2_file_operations->open() handler if the driver 53 * from driver's v4l2_file_operations->open() handler if the driver
47 * uses v4l2_fh. 54 * uses v4l2_fh.
48 */ 55 */
49int v4l2_fh_init(struct v4l2_fh *fh, struct video_device *vdev); 56void v4l2_fh_init(struct v4l2_fh *fh, struct video_device *vdev);
50/* 57/*
51 * Add the fh to the list of file handles on a video_device. The file 58 * Add the fh to the list of file handles on a video_device. The file
52 * handle must be initialised first. 59 * handle must be initialised first.