aboutsummaryrefslogtreecommitdiffstats
path: root/include/media/saa7146.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/media/saa7146.h')
-rw-r--r--include/media/saa7146.h21
1 files changed, 12 insertions, 9 deletions
diff --git a/include/media/saa7146.h b/include/media/saa7146.h
index 2bc634fcb7bb..fee579f10b32 100644
--- a/include/media/saa7146.h
+++ b/include/media/saa7146.h
@@ -11,6 +11,8 @@
11#include <linux/i2c.h> /* for i2c subsystem */ 11#include <linux/i2c.h> /* for i2c subsystem */
12#include <asm/io.h> /* for accessing devices */ 12#include <asm/io.h> /* for accessing devices */
13#include <linux/stringify.h> 13#include <linux/stringify.h>
14#include <linux/mutex.h>
15
14#include <linux/vmalloc.h> /* for vmalloc() */ 16#include <linux/vmalloc.h> /* for vmalloc() */
15#include <linux/mm.h> /* for vmalloc_to_page() */ 17#include <linux/mm.h> /* for vmalloc_to_page() */
16 18
@@ -112,7 +114,7 @@ struct saa7146_dev
112 114
113 /* different device locks */ 115 /* different device locks */
114 spinlock_t slock; 116 spinlock_t slock;
115 struct semaphore lock; 117 struct mutex lock;
116 118
117 unsigned char __iomem *mem; /* pointer to mapped IO memory */ 119 unsigned char __iomem *mem; /* pointer to mapped IO memory */
118 int revision; /* chip revision; needed for bug-workarounds*/ 120 int revision; /* chip revision; needed for bug-workarounds*/
@@ -133,15 +135,16 @@ struct saa7146_dev
133 void (*vv_callback)(struct saa7146_dev *dev, unsigned long status); 135 void (*vv_callback)(struct saa7146_dev *dev, unsigned long status);
134 136
135 /* i2c-stuff */ 137 /* i2c-stuff */
136 struct semaphore i2c_lock; 138 struct mutex i2c_lock;
137 u32 i2c_bitrate; 139
138 struct saa7146_dma d_i2c; /* pointer to i2c memory */ 140 u32 i2c_bitrate;
139 wait_queue_head_t i2c_wq; 141 struct saa7146_dma d_i2c; /* pointer to i2c memory */
140 int i2c_op; 142 wait_queue_head_t i2c_wq;
143 int i2c_op;
141 144
142 /* memories */ 145 /* memories */
143 struct saa7146_dma d_rps0; 146 struct saa7146_dma d_rps0;
144 struct saa7146_dma d_rps1; 147 struct saa7146_dma d_rps1;
145}; 148};
146 149
147/* from saa7146_i2c.c */ 150/* from saa7146_i2c.c */
@@ -150,7 +153,7 @@ int saa7146_i2c_transfer(struct saa7146_dev *saa, const struct i2c_msg *msgs, in
150 153
151/* from saa7146_core.c */ 154/* from saa7146_core.c */
152extern struct list_head saa7146_devices; 155extern struct list_head saa7146_devices;
153extern struct semaphore saa7146_devices_lock; 156extern struct mutex saa7146_devices_lock;
154int saa7146_register_extension(struct saa7146_extension*); 157int saa7146_register_extension(struct saa7146_extension*);
155int saa7146_unregister_extension(struct saa7146_extension*); 158int saa7146_unregister_extension(struct saa7146_extension*);
156struct saa7146_format* format_by_fourcc(struct saa7146_dev *dev, int fourcc); 159struct saa7146_format* format_by_fourcc(struct saa7146_dev *dev, int fourcc);