Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 108243
b: refs/heads/master
c: b1c3c89
h: refs/heads/master
i:
  108241: 2386dc0
  108239: 297acbd
v: v3
  • Loading branch information
David Brownell authored and Linus Torvalds committed Aug 12, 2008
1 parent 469ad45 commit c36549a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 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: 9623e078c1f4692a91531af2f639ec8aff8f0472
refs/heads/master: b1c3c898274334a9255445ba0636d13eda8399d7
12 changes: 3 additions & 9 deletions trunk/drivers/rtc/rtc-dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

#include <linux/module.h>
#include <linux/rtc.h>
#include <linux/smp_lock.h>
#include "rtc-core.h"

static dev_t rtc_devt;
Expand All @@ -27,11 +26,8 @@ static int rtc_dev_open(struct inode *inode, struct file *file)
struct rtc_device, char_dev);
const struct rtc_class_ops *ops = rtc->ops;

lock_kernel();
if (test_and_set_bit_lock(RTC_DEV_BUSY, &rtc->flags)) {
err = -EBUSY;
goto out;
}
if (test_and_set_bit_lock(RTC_DEV_BUSY, &rtc->flags))
return -EBUSY;

file->private_data = rtc;

Expand All @@ -41,13 +37,11 @@ static int rtc_dev_open(struct inode *inode, struct file *file)
rtc->irq_data = 0;
spin_unlock_irq(&rtc->irq_lock);

goto out;
return 0;
}

/* something has gone wrong */
clear_bit_unlock(RTC_DEV_BUSY, &rtc->flags);
out:
unlock_kernel();
return err;
}

Expand Down

0 comments on commit c36549a

Please sign in to comment.