diff options
Diffstat (limited to 'drivers/char/i8k.c')
-rw-r--r-- | drivers/char/i8k.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/char/i8k.c b/drivers/char/i8k.c index 4cd8b227c11f..3bc0eef88717 100644 --- a/drivers/char/i8k.c +++ b/drivers/char/i8k.c | |||
@@ -23,7 +23,7 @@ | |||
23 | #include <linux/seq_file.h> | 23 | #include <linux/seq_file.h> |
24 | #include <linux/dmi.h> | 24 | #include <linux/dmi.h> |
25 | #include <linux/capability.h> | 25 | #include <linux/capability.h> |
26 | #include <linux/smp_lock.h> | 26 | #include <linux/mutex.h> |
27 | #include <asm/uaccess.h> | 27 | #include <asm/uaccess.h> |
28 | #include <asm/io.h> | 28 | #include <asm/io.h> |
29 | 29 | ||
@@ -56,6 +56,7 @@ | |||
56 | 56 | ||
57 | #define I8K_TEMPERATURE_BUG 1 | 57 | #define I8K_TEMPERATURE_BUG 1 |
58 | 58 | ||
59 | static DEFINE_MUTEX(i8k_mutex); | ||
59 | static char bios_version[4]; | 60 | static char bios_version[4]; |
60 | 61 | ||
61 | MODULE_AUTHOR("Massimo Dal Zotto (dz@debian.org)"); | 62 | MODULE_AUTHOR("Massimo Dal Zotto (dz@debian.org)"); |
@@ -399,9 +400,9 @@ static long i8k_ioctl(struct file *fp, unsigned int cmd, unsigned long arg) | |||
399 | { | 400 | { |
400 | long ret; | 401 | long ret; |
401 | 402 | ||
402 | lock_kernel(); | 403 | mutex_lock(&i8k_mutex); |
403 | ret = i8k_ioctl_unlocked(fp, cmd, arg); | 404 | ret = i8k_ioctl_unlocked(fp, cmd, arg); |
404 | unlock_kernel(); | 405 | mutex_unlock(&i8k_mutex); |
405 | 406 | ||
406 | return ret; | 407 | return ret; |
407 | } | 408 | } |