RTC: convert mutex to bitfield
commit8853c202b4a91713dbfb4d9b6e1c87cc2aa12392
authorJiri Kosina <jkosina@suse.cz>
Thu, 29 Nov 2007 00:22:03 +0000 (28 16:22 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Thu, 29 Nov 2007 17:24:54 +0000 (29 09:24 -0800)
treea6c9621d3067eebc17c2ce53fa45e7513ee832a6
parent08b633070ad5fa17a837428a601c32cf3db6aafd
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>
drivers/rtc/interface.c
drivers/rtc/rtc-dev.c
include/linux/rtc.h