aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/v4l2-fh.c
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@maxwell.research.nokia.com>2010-03-01 03:14:18 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-05-19 11:58:06 -0400
commitc3b5b0241f620a356c97d8f43343e721c718806d (patch)
tree6323e5be6b646fea67059f069a186ef8557bdbdb /drivers/media/video/v4l2-fh.c
parentfda1021477b390506ebed0225eaa6d31a903e2b7 (diff)
V4L/DVB: V4L: Events: Add backend
Add event handling backend to V4L2. The backend handles event subscription and delivery to file handles. Event subscriptions are based on file handle. Events may be delivered to all subscribed file handles on a device independent of where they originate from. Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/v4l2-fh.c')
-rw-r--r--drivers/media/video/v4l2-fh.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/media/video/v4l2-fh.c b/drivers/media/video/v4l2-fh.c
index 93ea0af5fac1..aab2fb639ef1 100644
--- a/drivers/media/video/v4l2-fh.c
+++ b/drivers/media/video/v4l2-fh.c
@@ -25,6 +25,8 @@
25#include <linux/bitops.h> 25#include <linux/bitops.h>
26#include <media/v4l2-dev.h> 26#include <media/v4l2-dev.h>
27#include <media/v4l2-fh.h> 27#include <media/v4l2-fh.h>
28#include <media/v4l2-event.h>
29#include <media/v4l2-ioctl.h>
28 30
29int v4l2_fh_init(struct v4l2_fh *fh, struct video_device *vdev) 31int v4l2_fh_init(struct v4l2_fh *fh, struct video_device *vdev)
30{ 32{
@@ -32,7 +34,7 @@ int v4l2_fh_init(struct v4l2_fh *fh, struct video_device *vdev)
32 INIT_LIST_HEAD(&fh->list); 34 INIT_LIST_HEAD(&fh->list);
33 set_bit(V4L2_FL_USES_V4L2_FH, &fh->vdev->flags); 35 set_bit(V4L2_FL_USES_V4L2_FH, &fh->vdev->flags);
34 36
35 return 0; 37 return v4l2_event_init(fh);
36} 38}
37EXPORT_SYMBOL_GPL(v4l2_fh_init); 39EXPORT_SYMBOL_GPL(v4l2_fh_init);
38 40
@@ -62,5 +64,7 @@ void v4l2_fh_exit(struct v4l2_fh *fh)
62 return; 64 return;
63 65
64 fh->vdev = NULL; 66 fh->vdev = NULL;
67
68 v4l2_event_free(fh);
65} 69}
66EXPORT_SYMBOL_GPL(v4l2_fh_exit); 70EXPORT_SYMBOL_GPL(v4l2_fh_exit);