From 03ba675c15fe86ace9d44dc86d769b6695621e69 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Sat, 7 Feb 2009 11:23:40 +0100 Subject: saa7146: implement v4l2_device support. From: Hans Verkuil Priority: normal Signed-off-by: Hans Verkuil --- linux/include/media/saa7146.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'linux/include/media/saa7146.h') diff --git a/linux/include/media/saa7146.h b/linux/include/media/saa7146.h index 8034124f1..689bc8ebd 100644 --- a/linux/include/media/saa7146.h +++ b/linux/include/media/saa7146.h @@ -14,6 +14,7 @@ #include "compat.h" #include #include +#include #include /* for vmalloc() */ #include /* for vmalloc_to_page() */ @@ -111,6 +112,8 @@ struct saa7146_dev struct list_head item; + struct v4l2_device v4l2_dev; + /* different device locks */ spinlock_t slock; struct mutex lock; -- cgit v1.2.3 From 730fafde64c1efd147ec7f58edf1bc0cc24ef24b Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Sat, 7 Feb 2009 11:38:12 +0100 Subject: saa7146: i2c adapdata now points to v4l2_device. From: Hans Verkuil Prepare for converting to v4l2_subdev. Priority: normal Signed-off-by: Hans Verkuil --- linux/include/media/saa7146.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'linux/include/media/saa7146.h') diff --git a/linux/include/media/saa7146.h b/linux/include/media/saa7146.h index 689bc8ebd..8cb90d36e 100644 --- a/linux/include/media/saa7146.h +++ b/linux/include/media/saa7146.h @@ -149,6 +149,11 @@ struct saa7146_dev struct saa7146_dma d_rps1; }; +static inline struct saa7146_dev *to_saa7146_dev(struct v4l2_device *v4l2_dev) +{ + return container_of(v4l2_dev, struct saa7146_dev, v4l2_dev); +} + /* from saa7146_i2c.c */ int saa7146_i2c_adapter_prepare(struct saa7146_dev *dev, struct i2c_adapter *i2c_adapter, u32 bitrate); -- cgit v1.2.3