diff options
Diffstat (limited to 'include/media/saa7146.h')
-rw-r--r-- | include/media/saa7146.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/media/saa7146.h b/include/media/saa7146.h index c5a6e22a4b37..7a9f76ecbbbd 100644 --- a/include/media/saa7146.h +++ b/include/media/saa7146.h | |||
@@ -13,11 +13,12 @@ | |||
13 | #include <linux/stringify.h> | 13 | #include <linux/stringify.h> |
14 | #include <linux/mutex.h> | 14 | #include <linux/mutex.h> |
15 | #include <linux/scatterlist.h> | 15 | #include <linux/scatterlist.h> |
16 | #include <media/v4l2-device.h> | ||
16 | 17 | ||
17 | #include <linux/vmalloc.h> /* for vmalloc() */ | 18 | #include <linux/vmalloc.h> /* for vmalloc() */ |
18 | #include <linux/mm.h> /* for vmalloc_to_page() */ | 19 | #include <linux/mm.h> /* for vmalloc_to_page() */ |
19 | 20 | ||
20 | #define SAA7146_VERSION_CODE 0x000500 /* 0.5.0 */ | 21 | #define SAA7146_VERSION_CODE 0x000600 /* 0.6.0 */ |
21 | 22 | ||
22 | #define saa7146_write(sxy,adr,dat) writel((dat),(sxy->mem+(adr))) | 23 | #define saa7146_write(sxy,adr,dat) writel((dat),(sxy->mem+(adr))) |
23 | #define saa7146_read(sxy,adr) readl(sxy->mem+(adr)) | 24 | #define saa7146_read(sxy,adr) readl(sxy->mem+(adr)) |
@@ -110,6 +111,8 @@ struct saa7146_dev | |||
110 | 111 | ||
111 | struct list_head item; | 112 | struct list_head item; |
112 | 113 | ||
114 | struct v4l2_device v4l2_dev; | ||
115 | |||
113 | /* different device locks */ | 116 | /* different device locks */ |
114 | spinlock_t slock; | 117 | spinlock_t slock; |
115 | struct mutex lock; | 118 | struct mutex lock; |
@@ -145,6 +148,11 @@ struct saa7146_dev | |||
145 | struct saa7146_dma d_rps1; | 148 | struct saa7146_dma d_rps1; |
146 | }; | 149 | }; |
147 | 150 | ||
151 | static inline struct saa7146_dev *to_saa7146_dev(struct v4l2_device *v4l2_dev) | ||
152 | { | ||
153 | return container_of(v4l2_dev, struct saa7146_dev, v4l2_dev); | ||
154 | } | ||
155 | |||
148 | /* from saa7146_i2c.c */ | 156 | /* from saa7146_i2c.c */ |
149 | int saa7146_i2c_adapter_prepare(struct saa7146_dev *dev, struct i2c_adapter *i2c_adapter, u32 bitrate); | 157 | int saa7146_i2c_adapter_prepare(struct saa7146_dev *dev, struct i2c_adapter *i2c_adapter, u32 bitrate); |
150 | 158 | ||