summaryrefslogtreecommitdiff
path: root/drivers/staging/go7007/go7007-priv.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/go7007/go7007-priv.h')
-rw-r--r--drivers/staging/go7007/go7007-priv.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/staging/go7007/go7007-priv.h b/drivers/staging/go7007/go7007-priv.h
index ce9307e3e186..b58c394c6555 100644
--- a/drivers/staging/go7007/go7007-priv.h
+++ b/drivers/staging/go7007/go7007-priv.h
@@ -21,6 +21,8 @@
* user-space applications.
*/
+#include <media/v4l2-device.h>
+
struct go7007;
/* IDs to activate board-specific support code */
@@ -167,6 +169,7 @@ struct go7007 {
int channel_number; /* for multi-channel boards like Adlink PCI-MPG24 */
char name[64];
struct video_device *video_dev;
+ struct v4l2_device v4l2_dev;
int ref_count;
enum { STATUS_INIT, STATUS_ONLINE, STATUS_SHUTDOWN } status;
spinlock_t spinlock;
@@ -240,6 +243,11 @@ struct go7007 {
unsigned short interrupt_data;
};
+static inline struct go7007 *to_go7007(struct v4l2_device *v4l2_dev)
+{
+ return container_of(v4l2_dev, struct go7007, v4l2_dev);
+}
+
/* All of these must be called with the hpi_lock mutex held! */
#define go7007_interface_reset(go) \
((go)->hpi_ops->interface_reset(go))