diff options
author | Jiri Kosina <jkosina@suse.cz> | 2007-11-29 03:22:03 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-29 20:24:54 +0300 |
commit | 8853c202b4a91713dbfb4d9b6e1c87cc2aa12392 (patch) | |
tree | a6c9621d3067eebc17c2ce53fa45e7513ee832a6 /include | |
parent | 08b633070ad5fa17a837428a601c32cf3db6aafd (diff) | |
download | linux-8853c202b4a91713dbfb4d9b6e1c87cc2aa12392.tar.xz |
RTC: convert mutex to bitfield
RTC code is using mutex to assure exclusive access to /dev/rtc. This is
however wrong usage, as it leaves the mutex locked when returning into
userspace, which is unacceptable.
Convert rtc->char_lock into bit operation.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/rtc.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/rtc.h b/include/linux/rtc.h index 6d5e4a46781e..f2d0d1527721 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h @@ -133,6 +133,9 @@ struct rtc_class_ops { #define RTC_DEVICE_NAME_SIZE 20 struct rtc_task; +/* flags */ +#define RTC_DEV_BUSY 0 + struct rtc_device { struct device dev; @@ -145,7 +148,7 @@ struct rtc_device struct mutex ops_lock; struct cdev char_dev; - struct mutex char_lock; + unsigned long flags; unsigned long irq_data; spinlock_t irq_lock; |