diff options
author | Ingo Molnar <mingo@elte.hu> | 2006-02-07 03:49:14 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-02-07 03:49:14 -0500 |
commit | 3593cab5d62c4c7abced1076710f9bc2d8847433 (patch) | |
tree | dd5dc21961f6b4aef6900b0c2eb63ce7c70aecd5 /include | |
parent | 538f9630afbbe429ecbcdcf92536200293a8e4b3 (diff) |
V4L/DVB (3318b): sem2mutex: drivers/media/, #2
Semaphore to mutex conversion.
The conversion was generated via scripts, and the result was validated
automatically via a script as well.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/videodev2.h | 3 | ||||
-rw-r--r-- | include/media/saa7146.h | 21 | ||||
-rw-r--r-- | include/media/video-buf-dvb.h | 2 | ||||
-rw-r--r-- | include/media/video-buf.h | 2 |
4 files changed, 16 insertions, 12 deletions
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 965c8902fe60..1dd8efeff35a 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/time.h> /* need struct timeval */ | 17 | #include <linux/time.h> /* need struct timeval */ |
18 | #include <linux/poll.h> | 18 | #include <linux/poll.h> |
19 | #include <linux/device.h> | 19 | #include <linux/device.h> |
20 | #include <linux/mutex.h> | ||
20 | #endif | 21 | #endif |
21 | #include <linux/compiler.h> /* need __user */ | 22 | #include <linux/compiler.h> /* need __user */ |
22 | 23 | ||
@@ -90,7 +91,7 @@ struct video_device | |||
90 | 91 | ||
91 | /* for videodev.c intenal usage -- please don't touch */ | 92 | /* for videodev.c intenal usage -- please don't touch */ |
92 | int users; /* video_exclusive_{open|close} ... */ | 93 | int users; /* video_exclusive_{open|close} ... */ |
93 | struct semaphore lock; /* ... helper function uses these */ | 94 | struct mutex lock; /* ... helper function uses these */ |
94 | char devfs_name[64]; /* devfs */ | 95 | char devfs_name[64]; /* devfs */ |
95 | struct class_device class_dev; /* sysfs */ | 96 | struct class_device class_dev; /* sysfs */ |
96 | }; | 97 | }; |
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 */ |
152 | extern struct list_head saa7146_devices; | 155 | extern struct list_head saa7146_devices; |
153 | extern struct semaphore saa7146_devices_lock; | 156 | extern struct mutex saa7146_devices_lock; |
154 | int saa7146_register_extension(struct saa7146_extension*); | 157 | int saa7146_register_extension(struct saa7146_extension*); |
155 | int saa7146_unregister_extension(struct saa7146_extension*); | 158 | int saa7146_unregister_extension(struct saa7146_extension*); |
156 | struct saa7146_format* format_by_fourcc(struct saa7146_dev *dev, int fourcc); | 159 | struct saa7146_format* format_by_fourcc(struct saa7146_dev *dev, int fourcc); |
diff --git a/include/media/video-buf-dvb.h b/include/media/video-buf-dvb.h index ad0a07a3a895..b78d90fe629f 100644 --- a/include/media/video-buf-dvb.h +++ b/include/media/video-buf-dvb.h | |||
@@ -11,7 +11,7 @@ struct videobuf_dvb { | |||
11 | struct videobuf_queue dvbq; | 11 | struct videobuf_queue dvbq; |
12 | 12 | ||
13 | /* video-buf-dvb state info */ | 13 | /* video-buf-dvb state info */ |
14 | struct semaphore lock; | 14 | struct mutex lock; |
15 | struct task_struct *thread; | 15 | struct task_struct *thread; |
16 | int nfeeds; | 16 | int nfeeds; |
17 | 17 | ||
diff --git a/include/media/video-buf.h b/include/media/video-buf.h index 8ecfd78e0027..d90dec5484ee 100644 --- a/include/media/video-buf.h +++ b/include/media/video-buf.h | |||
@@ -177,7 +177,7 @@ struct videobuf_queue_ops { | |||
177 | }; | 177 | }; |
178 | 178 | ||
179 | struct videobuf_queue { | 179 | struct videobuf_queue { |
180 | struct semaphore lock; | 180 | struct mutex lock; |
181 | spinlock_t *irqlock; | 181 | spinlock_t *irqlock; |
182 | struct pci_dev *pci; | 182 | struct pci_dev *pci; |
183 | 183 | ||