summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/v4l2-fh.c
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@maxwell.research.nokia.com>2010-03-01 05:14:18 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-05-19 12:58:06 -0300
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 93ea0af5fac..aab2fb639ef 100644
--- a/drivers/media/video/v4l2-fh.c
+++ b/drivers/media/video/v4l2-fh.c
@@ -25,6 +25,8 @@
#include <linux/bitops.h>
#include <media/v4l2-dev.h>
#include <media/v4l2-fh.h>
+#include <media/v4l2-event.h>
+#include <media/v4l2-ioctl.h>
int v4l2_fh_init(struct v4l2_fh *fh, struct video_device *vdev)
{
@@ -32,7 +34,7 @@ int v4l2_fh_init(struct v4l2_fh *fh, struct video_device *vdev)
INIT_LIST_HEAD(&fh->list);
set_bit(V4L2_FL_USES_V4L2_FH, &fh->vdev->flags);
- return 0;
+ return v4l2_event_init(fh);
}
EXPORT_SYMBOL_GPL(v4l2_fh_init);
@@ -62,5 +64,7 @@ void v4l2_fh_exit(struct v4l2_fh *fh)
return;
fh->vdev = NULL;
+
+ v4l2_event_free(fh);
}
EXPORT_SYMBOL_GPL(v4l2_fh_exit);