Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 100311
b: refs/heads/master
c: 9aaf20c
h: refs/heads/master
i:
  100309: 7495f69
  100307: c815a4a
  100303: 86a848d
v: v3
  • Loading branch information
Jonathan Corbet committed Jun 20, 2008
1 parent d19eb25 commit 50cac07
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5e9829ad38c24aa71252e643836e7cedcb1c83d7
refs/heads/master: 9aaf20cbf5b7cccd45495326cba0b35b2884e6b3
5 changes: 5 additions & 0 deletions trunk/drivers/sbus/char/vfc_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <linux/spinlock.h>
#include <linux/mutex.h>
#include <linux/mm.h>
#include <linux/smp_lock.h>

#include <asm/openprom.h>
#include <asm/oplib.h>
Expand Down Expand Up @@ -178,14 +179,17 @@ static int vfc_open(struct inode *inode, struct file *file)
{
struct vfc_dev *dev;

lock_kernel();
spin_lock(&vfc_dev_lock);
dev = vfc_get_dev_ptr(iminor(inode));
if (dev == NULL) {
spin_unlock(&vfc_dev_lock);
unlock_kernel();
return -ENODEV;
}
if (dev->busy) {
spin_unlock(&vfc_dev_lock);
unlock_kernel();
return -EBUSY;
}

Expand All @@ -202,6 +206,7 @@ static int vfc_open(struct inode *inode, struct file *file)
vfc_captstat_reset(dev);

vfc_unlock_device(dev);
unlock_kernel();
return 0;
}

Expand Down

0 comments on commit 50cac07

Please sign in to comment.