Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 74583
b: refs/heads/master
c: 372a302
h: refs/heads/master
i:
  74581: 66a9801
  74579: e352b06
  74575: 1700f16
v: v3
  • Loading branch information
Jiri Kosina authored and Linus Torvalds committed Dec 5, 2007
1 parent 2dc5a9b commit 2ba9f73
Show file tree
Hide file tree
Showing 3 changed files with 6 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: 5cd17569fd0eeca510735e63a6061291e3971bf6
refs/heads/master: 372a302e9a892229206aafca0352584a745bc5f3
4 changes: 2 additions & 2 deletions trunk/drivers/rtc/interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ int rtc_irq_register(struct rtc_device *rtc, struct rtc_task *task)
return -EINVAL;

/* Cannot register while the char dev is in use */
if (test_and_set_bit(RTC_DEV_BUSY, &rtc->flags))
if (test_and_set_bit_lock(RTC_DEV_BUSY, &rtc->flags))
return -EBUSY;

spin_lock_irq(&rtc->irq_task_lock);
Expand All @@ -303,7 +303,7 @@ int rtc_irq_register(struct rtc_device *rtc, struct rtc_task *task)
}
spin_unlock_irq(&rtc->irq_task_lock);

clear_bit(RTC_DEV_BUSY, &rtc->flags);
clear_bit_unlock(RTC_DEV_BUSY, &rtc->flags);

return retval;
}
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/rtc/rtc-dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ static int rtc_dev_open(struct inode *inode, struct file *file)
struct rtc_device, char_dev);
const struct rtc_class_ops *ops = rtc->ops;

if (test_and_set_bit(RTC_DEV_BUSY, &rtc->flags))
if (test_and_set_bit_lock(RTC_DEV_BUSY, &rtc->flags))
return -EBUSY;

file->private_data = rtc;
Expand All @@ -41,7 +41,7 @@ static int rtc_dev_open(struct inode *inode, struct file *file)
}

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

Expand Down Expand Up @@ -402,7 +402,7 @@ static int rtc_dev_release(struct inode *inode, struct file *file)
if (rtc->ops->release)
rtc->ops->release(rtc->dev.parent);

clear_bit(RTC_DEV_BUSY, &rtc->flags);
clear_bit_unlock(RTC_DEV_BUSY, &rtc->flags);
return 0;
}

Expand Down

0 comments on commit 2ba9f73

Please sign in to comment.