Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+3 -3
+3 -3
drivers/char/tlclk.c
··· 37 37 #include <linux/ioport.h> 38 38 #include <linux/interrupt.h> 39 39 #include <linux/spinlock.h> 40 - #include <linux/smp_lock.h> 40 + #include <linux/mutex.h> 41 41 #include <linux/timer.h> 42 42 #include <linux/sysfs.h> 43 43 #include <linux/device.h> ··· 206 206 { 207 207 int result; 208 208 209 - lock_kernel(); 209 + mutex_lock(&tlclk_mutex); 210 210 if (test_and_set_bit(0, &useflags)) { 211 211 result = -EBUSY; 212 212 /* this legacy device is always one per system and it doesn't ··· 229 229 inb(TLCLK_REG6); /* Clear interrupt events */ 230 230 231 231 out: 232 - unlock_kernel(); 232 + mutex_unlock(&tlclk_mutex); 233 233 return result; 234 234 } 235 235