diff options
author | Arnd Bergmann <arnd@arndb.de> | 2010-09-11 13:31:43 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2010-10-19 05:29:54 -0400 |
commit | efbec1cd042008b49fe3cad45604088c54905a06 (patch) | |
tree | 21135467cb576f4b96fb09c28731488583a4137b | |
parent | c4a047272566b44b44222369d50a307c708c4f74 (diff) |
tlclk: remove big kernel lock
This driver already has a global mutex, so let's just
use that in the open function instead of the BKL.
It may not even be needed there, but this patch should
have the smallest impact.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Mark Gross <mark.gross@intel.com>
-rw-r--r-- | drivers/char/tlclk.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/char/tlclk.c b/drivers/char/tlclk.c index 80ea6bcfffdc..e32cbf0c9a0b 100644 --- a/drivers/char/tlclk.c +++ b/drivers/char/tlclk.c | |||
@@ -37,7 +37,7 @@ | |||
37 | #include <linux/ioport.h> | 37 | #include <linux/ioport.h> |
38 | #include <linux/interrupt.h> | 38 | #include <linux/interrupt.h> |
39 | #include <linux/spinlock.h> | 39 | #include <linux/spinlock.h> |
40 | #include <linux/smp_lock.h> | 40 | #include <linux/mutex.h> |
41 | #include <linux/timer.h> | 41 | #include <linux/timer.h> |
42 | #include <linux/sysfs.h> | 42 | #include <linux/sysfs.h> |
43 | #include <linux/device.h> | 43 | #include <linux/device.h> |
@@ -206,7 +206,7 @@ static int tlclk_open(struct inode *inode, struct file *filp) | |||
206 | { | 206 | { |
207 | int result; | 207 | int result; |
208 | 208 | ||
209 | lock_kernel(); | 209 | mutex_lock(&tlclk_mutex); |
210 | if (test_and_set_bit(0, &useflags)) { | 210 | if (test_and_set_bit(0, &useflags)) { |
211 | result = -EBUSY; | 211 | result = -EBUSY; |
212 | /* this legacy device is always one per system and it doesn't | 212 | /* this legacy device is always one per system and it doesn't |
@@ -229,7 +229,7 @@ static int tlclk_open(struct inode *inode, struct file *filp) | |||
229 | inb(TLCLK_REG6); /* Clear interrupt events */ | 229 | inb(TLCLK_REG6); /* Clear interrupt events */ |
230 | 230 | ||
231 | out: | 231 | out: |
232 | unlock_kernel(); | 232 | mutex_unlock(&tlclk_mutex); |
233 | return result; | 233 | return result; |
234 | } | 234 | } |
235 | 235 | ||