diff options
author | Sakari Ailus <sakari.ailus@maxwell.research.nokia.com> | 2010-03-23 08:25:26 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-05-19 11:58:04 -0400 |
commit | 1babcb460f2b87c20eb6860b9685a0dab636cc4b (patch) | |
tree | aaffa67ec3b3fc958ea2d7eea50e1b67242f2645 /drivers/media/video/v4l2-dev.c | |
parent | 96d8eab5d0a1a9741a4cae1b3c125d75d1aabedf (diff) |
V4L/DVB: V4L: File handles
This patch adds a list of v4l2_fh structures to every video_device.
It allows using file handle related information in V4L2. The event interface
is one example of such use.
The use of v4l2_fh is not mandatory for drivers.
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-dev.c')
-rw-r--r-- | drivers/media/video/v4l2-dev.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/video/v4l2-dev.c b/drivers/media/video/v4l2-dev.c index 709069916068..65a7b30524ca 100644 --- a/drivers/media/video/v4l2-dev.c +++ b/drivers/media/video/v4l2-dev.c | |||
@@ -421,6 +421,10 @@ static int __video_register_device(struct video_device *vdev, int type, int nr, | |||
421 | if (!vdev->release) | 421 | if (!vdev->release) |
422 | return -EINVAL; | 422 | return -EINVAL; |
423 | 423 | ||
424 | /* v4l2_fh support */ | ||
425 | spin_lock_init(&vdev->fh_lock); | ||
426 | INIT_LIST_HEAD(&vdev->fh_list); | ||
427 | |||
424 | /* Part 1: check device type */ | 428 | /* Part 1: check device type */ |
425 | switch (type) { | 429 | switch (type) { |
426 | case VFL_TYPE_GRABBER: | 430 | case VFL_TYPE_GRABBER: |