Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 100315
b: refs/heads/master
c: 3462032
h: refs/heads/master
i:
  100313: d6ea9a6
  100311: 50cac07
v: v3
  • Loading branch information
Jonathan Corbet committed Jun 20, 2008
1 parent f5a82d4 commit d8a3059
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 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: a237f3bbaab28bb780201f15f6003cf3d2e81024
refs/heads/master: 3462032d66703ef7721329b44fe2dac4aaef475d
16 changes: 11 additions & 5 deletions trunk/drivers/isdn/hardware/eicon/divamnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/poll.h>
#include <linux/smp_lock.h>
#include <asm/uaccess.h>

#include "platform.h"
Expand Down Expand Up @@ -127,14 +128,19 @@ static unsigned int maint_poll(struct file *file, poll_table * wait)

static int maint_open(struct inode *ino, struct file *filep)
{
int ret;

lock_kernel();
/* only one open is allowed, so we test
it atomically */
if (test_and_set_bit(0, &opened))
return (-EBUSY);

filep->private_data = NULL;

return nonseekable_open(ino, filep);
ret = -EBUSY;
else {
filep->private_data = NULL;
ret = nonseekable_open(ino, filep);
}
unlock_kernel();
return ret;
}

static int maint_close(struct inode *ino, struct file *filep)
Expand Down

0 comments on commit d8a3059

Please sign in to comment.