Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 100335
b: refs/heads/master
c: 556889a
h: refs/heads/master
i:
  100333: 41d7680
  100331: f799810
  100327: 8312038
  100319: ecf9cbe
v: v3
  • Loading branch information
Arnd Bergmann authored and Jonathan Corbet committed Jun 20, 2008
1 parent f345cae commit 66fd87d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8324af6dddac11f9f7e9df8b784f6949ddb61b5d
refs/heads/master: 556889a4ae89d5f2adf98cac58ecf9326b0d0297
9 changes: 7 additions & 2 deletions trunk/drivers/char/briq_panel.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include <linux/module.h>

#include <linux/smp_lock.h>
#include <linux/types.h>
#include <linux/errno.h>
#include <linux/tty.h>
Expand Down Expand Up @@ -67,11 +68,15 @@ static void set_led(char state)

static int briq_panel_open(struct inode *ino, struct file *filep)
{
/* enforce single access */
if (vfd_is_open)
lock_kernel();
/* enforce single access, vfd_is_open is protected by BKL */
if (vfd_is_open) {
unlock_kernel();
return -EBUSY;
}
vfd_is_open = 1;

unlock_kernel();
return 0;
}

Expand Down

0 comments on commit 66fd87d

Please sign in to comment.