Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 100347
b: refs/heads/master
c: 742a2fe
h: refs/heads/master
i:
  100345: 04a92b9
  100343: 8e27231
v: v3
  • Loading branch information
Arnd Bergmann authored and Jonathan Corbet committed Jun 20, 2008
1 parent 2b2f556 commit 02b22c5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 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: 78abb6ac919cee123e632d833a42d0312ccb2b0d
refs/heads/master: 742a2fe31bf311d065a2bbacc2b363103b351300
7 changes: 6 additions & 1 deletion trunk/drivers/char/genrtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
#include <linux/init.h>
#include <linux/poll.h>
#include <linux/proc_fs.h>
#include <linux/smp_lock.h>
#include <linux/workqueue.h>

#include <asm/uaccess.h>
Expand Down Expand Up @@ -338,12 +339,16 @@ static int gen_rtc_ioctl(struct inode *inode, struct file *file,

static int gen_rtc_open(struct inode *inode, struct file *file)
{
if (gen_rtc_status & RTC_IS_OPEN)
lock_kernel();
if (gen_rtc_status & RTC_IS_OPEN) {
unlock_kernel();
return -EBUSY;
}

gen_rtc_status |= RTC_IS_OPEN;
gen_rtc_irq_data = 0;
irq_active = 0;
unlock_kernel();

return 0;
}
Expand Down

0 comments on commit 02b22c5

Please sign in to comment.