From 0b5f265a88d89cbbf8abc42ca3311cb3219162ab Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Sat, 12 Mar 2011 06:35:33 -0300 Subject: [media] cx18: use v4l2_fh as preparation for adding core priority support Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/cx18/cx18-driver.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'drivers/media/video/cx18/cx18-driver.h') 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 #include #include +#include #include #include #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; -- cgit v1.2.3