Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 100377
b: refs/heads/master
c: 4101273
h: refs/heads/master
i:
  100375: a9cb871
v: v3
  • Loading branch information
Arnd Bergmann authored and Jonathan Corbet committed Jul 2, 2008
1 parent cf5360d commit ebd645c
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: 4333deee6b7a5a82afb9e700e76cb46e68fde68d
refs/heads/master: 41012735352e72b8a3f95521817dcad1b2986636
7 changes: 6 additions & 1 deletion trunk/drivers/rtc/rtc-m41t80.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/smp_lock.h>
#include <linux/string.h>
#include <linux/i2c.h>
#include <linux/rtc.h>
Expand Down Expand Up @@ -655,12 +656,16 @@ static int wdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
static int wdt_open(struct inode *inode, struct file *file)
{
if (MINOR(inode->i_rdev) == WATCHDOG_MINOR) {
if (test_and_set_bit(0, &wdt_is_open))
lock_kernel();
if (test_and_set_bit(0, &wdt_is_open)) {
unlock_kernel();
return -EBUSY;
}
/*
* Activate
*/
wdt_is_open = 1;
unlock_kernel();
return 0;
}
return -ENODEV;
Expand Down

0 comments on commit ebd645c

Please sign in to comment.