aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx18/cx18-driver.h
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2011-03-12 06:35:33 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-03-22 16:38:03 -0300
commit0b5f265a88d89cbbf8abc42ca3311cb3219162ab (patch)
tree39fa5fb61e8ef8d56593d5582cc50f5831b6d34d /drivers/media/video/cx18/cx18-driver.h
parent[media] v4l2-framework.txt: improve v4l2_fh/priority documentation (diff)
downloadlinux-dev-0b5f265a88d89cbbf8abc42ca3311cb3219162ab.tar.xz
linux-dev-0b5f265a88d89cbbf8abc42ca3311cb3219162ab.zip
[media] cx18: use v4l2_fh as preparation for adding core priority support
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx18/cx18-driver.h')
-rw-r--r--drivers/media/video/cx18/cx18-driver.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/media/video/cx18/cx18-driver.h b/drivers/media/video/cx18/cx18-driver.h
index de2457741e26..30a857473e54 100644
--- a/drivers/media/video/cx18/cx18-driver.h
+++ b/drivers/media/video/cx18/cx18-driver.h
@@ -50,6 +50,7 @@
#include <media/v4l2-common.h>
#include <media/v4l2-ioctl.h>
#include <media/v4l2-device.h>
+#include <media/v4l2-fh.h>
#include <media/tuner.h>
#include <media/ir-kbd-i2c.h>
#include "cx18-mailbox.h"
@@ -405,12 +406,23 @@ struct cx18_stream {
};
struct cx18_open_id {
+ struct v4l2_fh fh;
u32 open_id;
int type;
enum v4l2_priority prio;
struct cx18 *cx;
};
+static inline struct cx18_open_id *fh2id(struct v4l2_fh *fh)
+{
+ return container_of(fh, struct cx18_open_id, fh);
+}
+
+static inline struct cx18_open_id *file2id(struct file *file)
+{
+ return fh2id(file->private_data);
+}
+
/* forward declaration of struct defined in cx18-cards.h */
struct cx18_card;