diff options
author | Jonathan Corbet <corbet@lwn.net> | 2008-05-16 16:08:58 -0400 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2008-06-20 16:05:52 -0400 |
commit | 9aaf20cbf5b7cccd45495326cba0b35b2884e6b3 (patch) | |
tree | 3ea3a744d020ec4d4822518fb518cc8fc43324ad /drivers/sbus | |
parent | 5e9829ad38c24aa71252e643836e7cedcb1c83d7 (diff) |
videopix: BKL pushdown
Add explicit lock_kernel() calls to vfc_open().
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'drivers/sbus')
-rw-r--r-- | drivers/sbus/char/vfc_dev.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/sbus/char/vfc_dev.c b/drivers/sbus/char/vfc_dev.c index d4f8fcded51d..1f6cb8ae2784 100644 --- a/drivers/sbus/char/vfc_dev.c +++ b/drivers/sbus/char/vfc_dev.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/spinlock.h> | 24 | #include <linux/spinlock.h> |
25 | #include <linux/mutex.h> | 25 | #include <linux/mutex.h> |
26 | #include <linux/mm.h> | 26 | #include <linux/mm.h> |
27 | #include <linux/smp_lock.h> | ||
27 | 28 | ||
28 | #include <asm/openprom.h> | 29 | #include <asm/openprom.h> |
29 | #include <asm/oplib.h> | 30 | #include <asm/oplib.h> |
@@ -178,14 +179,17 @@ static int vfc_open(struct inode *inode, struct file *file) | |||
178 | { | 179 | { |
179 | struct vfc_dev *dev; | 180 | struct vfc_dev *dev; |
180 | 181 | ||
182 | lock_kernel(); | ||
181 | spin_lock(&vfc_dev_lock); | 183 | spin_lock(&vfc_dev_lock); |
182 | dev = vfc_get_dev_ptr(iminor(inode)); | 184 | dev = vfc_get_dev_ptr(iminor(inode)); |
183 | if (dev == NULL) { | 185 | if (dev == NULL) { |
184 | spin_unlock(&vfc_dev_lock); | 186 | spin_unlock(&vfc_dev_lock); |
187 | unlock_kernel(); | ||
185 | return -ENODEV; | 188 | return -ENODEV; |
186 | } | 189 | } |
187 | if (dev->busy) { | 190 | if (dev->busy) { |
188 | spin_unlock(&vfc_dev_lock); | 191 | spin_unlock(&vfc_dev_lock); |
192 | unlock_kernel(); | ||
189 | return -EBUSY; | 193 | return -EBUSY; |
190 | } | 194 | } |
191 | 195 | ||
@@ -202,6 +206,7 @@ static int vfc_open(struct inode *inode, struct file *file) | |||
202 | vfc_captstat_reset(dev); | 206 | vfc_captstat_reset(dev); |
203 | 207 | ||
204 | vfc_unlock_device(dev); | 208 | vfc_unlock_device(dev); |
209 | unlock_kernel(); | ||
205 | return 0; | 210 | return 0; |
206 | } | 211 | } |
207 | 212 | ||