Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 100342
b: refs/heads/master
c: 7ccef46
h: refs/heads/master
v: v3
  • Loading branch information
Arnd Bergmann authored and Jonathan Corbet committed Jun 20, 2008
1 parent 1813bf2 commit 782c7cc
Show file tree
Hide file tree
Showing 2 changed files with 5 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: 514bcc66d4072a221a8dfd341a4006385a441918
refs/heads/master: 7ccef46320ecd52c4d20c8aad592599df76bb7a1
4 changes: 4 additions & 0 deletions trunk/drivers/char/ds1286.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
* option) any later version.
*/
#include <linux/ds1286.h>
#include <linux/smp_lock.h>
#include <linux/types.h>
#include <linux/errno.h>
#include <linux/miscdevice.h>
Expand Down Expand Up @@ -252,6 +253,7 @@ static int ds1286_ioctl(struct inode *inode, struct file *file,

static int ds1286_open(struct inode *inode, struct file *file)
{
lock_kernel();
spin_lock_irq(&ds1286_lock);

if (ds1286_status & RTC_IS_OPEN)
Expand All @@ -260,10 +262,12 @@ static int ds1286_open(struct inode *inode, struct file *file)
ds1286_status |= RTC_IS_OPEN;

spin_unlock_irq(&ds1286_lock);
unlock_kernel();
return 0;

out_busy:
spin_lock_irq(&ds1286_lock);
unlock_kernel();
return -EBUSY;
}

Expand Down

0 comments on commit 782c7cc

Please sign in to comment.